- Strength to Increase Rep
- +15
- Strength to Decrease Rep
- -3
- Upvotes Received
- 264
- Posts with Upvotes
- 214
- Upvoting Members
- 81
- Downvotes Received
- 45
- Posts with Downvotes
- 17
- Downvoting Members
- 24
- Interests
- Cooking
- PC Specs
- Compaq
986 Posted Topics
Those who know how to win are more numerous than those who know how to make proper use of their victories. --- Polybius
Salmon with basil and orzo pasta, yum yum! To that I drink a nice glass of California red wine. M&Ms, candy from the Spanish Civil War, how original!
If you want friends that match your narrow mind, I would find them at my church!
More information on Unununium Python based OS, also kindly known as UUU, can be had at: [url]http://unununium.org/introduction[/url]
Linux sounds more and more interesting. Seems to have a lot of nice tools.
@sravan953 also remember that in Python2 ' /' is an integer division by default. For instance 12/15 gives you a zero. This has changed in Python3.
Why are you using the C snippets for a C++ snippet? There is a difference between the two old languages.
You can use the canvas image as a background to your turtle drawings: ''' turtle_Tk_Canvas_Image_url.py display a GIF image obtained from an internet web page on a Tkinter canvas, then use the canvas for some turtle drawing modified Vegaseat code ''' import io import base64 import turtle try: # Python2 …
My cat took an interest in the keyboard after I left the room for a moment. It thoroughly messed up my Internet Explorer settings and took a while to fix.
My feet are smelling My nose is running I park in my driveway I drive on a parkway
A typical application of what you want to achieve is this book page indexing program: [code=python]# create a page index using a word:pagenumber dictionary def do_index(keyword, pagenumber, page_index): """ if keyword exists add pagenumber to that particular list otherwise make new entry to index dictionary """ page_index.setdefault(keyword, []).append(pagenumber) return page_index …
http://en.wikipedia.org/wiki/Steganography
Module subprocess, specifically subprocess.Popen(), has a wait() method. Here is a typical example: [code=python]# using module subprocess to pass arguments to and from an # external program: import subprocess # put in the corresponding strings for # "mycmd" --> external program name # "myarg" --> arg for external program # …
A few reasons to use Python classes come to mind, one is to group functions (in a class they are called methods) that belong together. This is sort of what modules do. However, classes have a leg up on modules, they have a way to inherit other classes and establish …
In general a hashing algorithm turns a hashable object (immutable) into an integer value that is much faster to search.
You can use a global variable within a function by prefixing it with the word "global". Here is an example: [code]# keep track of how many times a function has been accessed # using a global variable, somewhat frowned upon def counter1(): global count # your regular code here count …
An electronic version of an Index Card File would be interesting, like a collection of recipes for cooking. You could search quickly using a limited set of keywords/titles, or slower using the general text of each card. If you want to be fancy, you can add a feature to cook …
I have played with Python a little and find it refreshing compared to C++. Gone is the long list of header files and references to obscure libraries in the make/batch file for the compiler. Also gone are the "gotchya" memory leaks. I have to get used to the fact that …
The first problem could be kind of easy: [code]n = 11 for odd_number in range(1, n+1, 2): print( odd_number ) """ 1 3 5 7 9 11 """ [/code]
There is no egg in eggplant. An alarm goes off by going on. When the stars are out, they are visible, but when the lights are out, they are invisible.
Swell job! Are the driving skills of the software only as good as the skills of the programmer?
I always thought that typing := was one of the less desirable things of Pascal, now GO has picked it up. Otherwise the language has some nice new approaches, some seem to come from Python.
Data mining might be a good speciality.
I got PyQT4 istalled and working on my Vista computer. Here is an example of my first program: [code=python]# display a bunch of random circles using PyQT4 import random import sys # pray for minimal namespace conflicts from PyQt4.QtCore import * from PyQt4.QtGui import * class DrawPoints(QWidget): def __init__(self, parent=None): …
Very nice! Just what I was looking for.
F = 9 * C/5 + 32 Is the same as F = (9/5) * C + 32 With Python2 / is integer division, so avoid it by using 5.0 instead of 5
I wonder if there is a way in Python to simply import everything?
This could help: https://www.daniweb.com/software-development/python/threads/20774/starting-python/20#post2169592
There is no 2^64-1 for such large numbers.
The with statement was introduced with Python 2.5 and the dictionary and set comprehensions with Python 2.7.3
Could not find complixity in the dictionary.
Well, C has a goto statement. However, an interpretive language with a good IDE is better for beginners.
I would say English language skills. Everyone in our department hates to call the help desk, because you can not understand those imported folks that work there.
Rub fresh ground garlic on your chest twice a day and you never get a cold again.
I average 1.276 hours per day.
I wonder how many countries celebrate Valentine's Day?
Buy one where the hard drive is not infected with spyware at the factory level.
To run older Python2 code examples with Python3 usually takes just a few modification. Python3 actually has a program called 2to3.py that will do that for you. Sooner or later it will be mostly Python3. So get version 3 of Python and a good IDE and start coding.
To see where you went wrong take a looky at: inventwithpython.com/chapter14.html
West coast all the way! Seahawks best thing after chicken wings and cheap beer!
A very simple way: [code=python]# create a string where the index gives the grade grade_str = 'F'*60 + 'D'*10 + 'C'*10 + 'B'*10 + 'A'*11 # ask for grade number input grade = int(raw_input("Enter the student's grade (0 to 100): ")) # index the result print "Grade letter =", grade_str[grade] …
PySide comes with drag and drop designer.
Very good third party modules to add to Python.
Are your indentations a mixture of tabs and spaces?
The End.