-
Replied To a Post in Homework Help (Build a house in Python)
The documentation for graphics.py is at [Click Here](http://mcsp.wartburg.edu/zelle/python/graphics/graphics.pdf) -
Replied To a Post in Homework Help (Build a house in Python)
This might be a hint: '''zg_triangle1.py using the Zelle graphics module (derived from Tkinter) http://mcsp.wartburg.edu/zelle/python/graphics.py ''' from graphics import * def drawTrianglePatch(win, colour): # polygon goes back to starting point … -
Replied To a Post in Recursion effects in Python?
Recursive functions have a neat look, but consume much stack space, Python sets a recursion limit of 1000. Recursive functions are rather slow, a while/for loop is much faster. Here … -
Replied To a Post in Serial Port Sniffer
Maybe pySerial will do: https://pyserial.readthedocs.io/en/latest/ -
Replied To a Post in how to all rows of a particular col in csv python
You might want to look at third party module **pandas** (it is a free download) http://pandas.pydata.org/pandas-docs/stable/tutorials.html#pandas-cookbook -
Replied To a Post in nothing
"The world is a dangerous place, not because of those who do evil, but because of those who look on and do nothing." Albert Einstein -
Replied To a Post in Hide Private Message in an Image (Python)
The algorithm used here works best wirth PNG or BMP image files. Image file formats that use compression that leads to a loss in picture quality are not suitable. -
Replied To a Post in Prime Number Ranking in Python
The problem with the code in https://codegolf.stackexchange.com/questions/4707/outputting-ordinal-numbers-1st-2nd-3rd#answer-4712 is that the suffix for mumbers 11, 12, 13 is wrong. -
Replied To a Post in Unable to save Image using URL?
Here is another example I wrote a while ago: ''' urlretrieve_image1.py retrieve and save an image from a web page using ... urlretrieve(url[, filename[, reporthook[, data]]]) tested with Python27 and … -
Replied To a Post in computing a sum of geometric sequences together
BTW, if the sequence is very large use a generator expression. Hint ... # using a generator expression to sum directly t2000 = sum(3**k for k in range(2000)) print("sum of … -
Replied To a Post in Simple Tkinter Toggle Button
Very nice, thanks martineau! Got to testdrive your ideas. Right now I am working with an ACER Chromebook 15 and doing Python code is a little tough. Will get to … -
Replied To a Post in If a function does not have a return statement, is it valid?
Is this because Smalltalk is totally Object Oriented? With Python you can use a number of different programming styles. -
Replied To a Post in Simple Tkinter Toggle Button
@martineau: Since you are the expert in good Python programming, what is your solution? Show us what you got! -
Replied To a Post in computing a sum of geometric sequences together
Try to get the sequence of numbers into a list using a for loop. Then you can sum up the elements of the list with sum() -
Replied To a Post in If a function does not have a return statement, is it valid?
I could think of valid functions that perform an action, like formated printing. No need to return anything. -
Replied To a Post in python program
You are so right, I thought since 2 month had gone since the original request the whole thing became a teaser for the mind. -
Replied To a Post in python program
s = "123456789" for k in range(1, 10): print(s[-k:]) ''' output... 9 89 789 6789 56789 456789 3456789 23456789 123456789 ''' -
Replied To a Post in python program
Python has a nice thing called sequence **slicing**: [starting-at-index : but-less-than-index [ : step]] 'start' defaults to 0, 'end' to len(sequence), 'step' to 1 for instance s = "123456789" then … -
Replied To a Post in Binding Escape key in Tkinter GUI.
Give your function an argument, in this case just an empty one. **def exit(event):** -
Replied To a Post in Tkinter Digital Clock (Python)
GUI (Graphics User Interface) programs use a loop to check and update the information the program receives. With tkinter the loop is called mainloop. -
Replied To a Post in How to read sentence for sentence with Python
Here is the most basic approach ... sentence = "Hello, my name is Mattia" # default split is at whitespace for word in sentence.split(): print(word) ''' result ... Hello, my … -
Replied To a Post in Rude replies while helping
Some posters are rude because they don't know any better. For instance they grew up in a home/society where everything was handed to them. My solution, give them an answer … -
Replied To a Post in Obfuscate my EXE program compiled with pyinstaller
If your program is any good, then sooner or later someone will simply write a better program without reverse engineering. -
Replied To a Post in Owner question
You can claim, but the rub is that you have to be willing to defend your claim in a court of law at great expense. -
Replied To a Post in Random Facts
Maybe this keeps mass shootings away from Kentucky ... From January 1 to September 30, 2015, the US Federal Bureau of Investigation (FBI) conducted more than 2.3 million background checks … -
Replied To a Post in Random Facts
Asylum seekers in Germany complaints: The free food is bad. Not enough free spending money. The bathrooms stink. The free rooms are cold. German complaints about their guests: Most don't … -
Replied To a Post in Random Facts
About the size of the National Debt of the United States in another 20.7 years. -
Replied To a Post in Random Facts
Germany spends an estimated 1000 Euros on each asylumseeker per month. They expect about one million new asylumseekers this year alone, more than that next year. Many arrive without any … -
Replied To a Post in for software engineers please HELP
Of course you can study algorithms first, but you have to be aware that a particular pet algorithm may not be stable or very efficient in the computer language you … -
Replied To a Post in for software engineers please HELP
Actually, the chicken came first then the egg. -
Replied To a Post in Tkinter to put a GIF Image on a Canvas (Python)
To get a GIF picture from the Internet ... ''' Tk_Canvas_Image_url.py display an image obtained from an internet web page in Tkinter tested with Python27 and Python34 by vagaseat 21nov2012 … -
Replied To a Post in Hexidecimal to decimal
Math with hexadecimal numbers ... hx1 = "FF" hx2 = "B7" product = int(hx1, 16) * int(hx2, 16) print("{} * {} = {} --> {:X}".format(hx1, hx2, product, product)) ''' FF … -
Replied To a Post in Hexidecimal to decimal
Python function int() will do this for you ... hx = "FFFF" # convert hexadecimal string hx to a denary (base 10) number n = int(hx, 16) print(n) # 65535 -
Edited A taste of Swift part 1
The Swift computer language is the brainchild of a number of Apple associates. In my humble opinion it shows some nice features, but also some warts. Part 1 (constants, variables, … -
Replied To a Post in A taste of Swift part 1
Swift2 has come upon us bringing along a fair number of changes. I have taken the original Swift 1.2 snippet and run it through the migration utility. Just like in … -
Replied To a Post in Formatting a print
One of the many ways ... table =[ ["_","_","_"], ["_","_","_"], ["_","_","_"] ] header = [1, 2, 3] sf = "{} {} {}" print(sf.format(*header)) for line in table: print(sf.format(*line)) -
Marked Solved Status for Java
So a lot of threads begin by some noob coming along and asking is c++ or c or java going to die and almost certainly, the answer, all have stood … -
Marked Solved Status for Would you play your laptop in bed???
Would you play your laptop in bed??? -
Replied To a Post in Jokes
An old cowboy dressed to kill with cowboy shirt, hat, jeans, spurs and chaps went to a bar and ordered a drink. As he sat there sipping his whiskey, a … -
Replied To a Post in Python Companion operator
A further look at the memory locations ... >>> a = 10.1 >>> b = 10.1 >>> a is b False >>> c = 10.1; d = 10.1 >>> c … -
Replied To a Post in Applying PySide's QAbstractTableModel
Should work, good idea. I am surprised that anybody still uses these snippets. I have stopped writing them because there was so little interest. -
Replied To a Post in C / C++ FAQ's and Practice problems
Prove that (-1/2)! equals sqrt(pi) -
Created Rest in Peace - Frank Gifford
Frank Gifford, America's most beloved sports entertainer has passed away in an untimely manner. A great loss for the country and the world. -
Replied To a Post in Nature's Temper
I keep reading that parts of Europe are experiencing a sizzling summer with record heat. I wonder if other parts of the world notice in increase in heat? -
Replied To a Post in Memorable Quotations
"A politician is a fellow who will lay down your life for his country." ... Tex Guinan -
Replied To a Post in thesis
"Replacing the Judicial System with a Computer Database" -
Replied To a Post in No more www, what would happen?
There might be a lot of "nationalnets" rather than one "internet". -
Replied To a Post in Jokes
Due to political correctness a 'DUMB BLONDE' is now a 'LIGHT-HAIRED DETOUR OFF THE INFORMATION SUPERHIGHWAY'. -
Replied To a Post in Memorable Quotations
The Mafia is organized crime. The Government is disorganized crime. ... Stefan Molyneux -
Replied To a Post in No more www, what would happen?
It would only go away if "something" better came along. Maybe finally "something" the hackers couldn't abuse at will. I just got a letter from the UCLA hospital that their …
The End.