988 Posted Topics
Re: You can use Tkinter that comes with the Python installation: [code]# using Tkinter's Optionmenu() as a combobox try: # Python2 import Tkinter as tk except ImportError: # Python3 import tkinter as tk def select(): sf = "value is %s" % var.get() root.title(sf) # optional color = var.get() root['bg'] = color … | |
Re: Like Tony recommends: [code]def ten_times(n): print(n*10) x = int(input("How many repeats (enter an integer value): ")) for n in range(x): ten_times(n+1) [/code] | |
Re: Pygame uses (red, green, blue) tuples for colors. The values of the red, green, blue variables are integers between 0 and 255. So color_red = (255, 0, 0) color_blue = (0, 0, 255) and values between, just experiment a little. | |
Re: The last update of MS IE did me in, after it fooled around with my 'favorite folders'. I am now a very happy Firefox user. | |
Re: See: [url]http://www.python.org/peps/pep-0263.html[/url] | |
Re: Take you pick: Unix OS is '\n' Windows is '\r\n' Mac OS is '\r' | |
Re: [QUOTE=richieking;1431668]I like one-liners but jureslak one-liner for third pseudo is not good for readability and maintainance :)[/QUOTE]I agree, also one-liners can be very slow. | |
Re: Actually Birthday should be every day! :) Happy Birthday Sweety! | |
Just a simple console blackjack game. The bread and butter code was written with lots of comments, so you can improve on it. Really, the most important part is figuring out when an ace is 11 in value and when it is a 1 in value, so you don't bust. | |
| |
Re: Execution speed is probably of limited interest for a beginner. Concentrate on learning the basics of Python rather thoroughly. Any program that has display updates and disk access in it, is limited a lot by those operations anyway! Either Python 2.6 or Python 2.7 will do fine for you. Why … | |
Re: Why would you need to update? Also, Python32 works just fine! | |
Re: Oh boy, Jaro's tab indented code looks like dung on a shingle. | |
Re: Maybe two years would make even more difference. | |
Re: [url]http://www.infidels.org/library/modern/jim_meritt/bible-contradictions.html[/url] Very interesting, AD! ![]() | |
Re: The problem with the public school system in the US is that it has to teach to the least common denominator. In other words, students that don't want to be taught. I like to hike in the mountains, take pictures with my camera, and do some hand drawn sketches. | |
Re: I used to collect Tonka sports cars when I was little. The Matchbox ones are okay too. | |
Re: Maybe something like this will help: [url]http://www.daniweb.com/software-development/python/threads/191210/1246492#post1246492[/url] | |
Re: I don't think there is much difference. However the version from Python.org is usually the most update version. ActivePython has the better installer for Linux. | |
Re: We had a crumpy old tool and die maker who lived on our street. He called himself [B]Die[/B], and yes I was afraid of [B]Die[/B]. | |
Re: Maybe a look at [url]http://docs.python.org/library/turtle.html[/url] will give you the hints you need | |
| |
Re: A good workout in the morning helps me think better all day! | |
Re: We will not do your homework for you. Show us an effort first, if you have problems we can help. | |
Re: everyone should us this more often: [QUOTE]gigo --> garbage in garbage out[/QUOTE] | |
Re: I like coffee better than tea. | |
| |
Re: I see a lot of rather sick retired old folks in my line of work. I would say [B]retirement is hell[/B] | |
Re: Are you thinking along the line of a record structure? You can easily set those up with a Python class. | |
Re: Take a quick look at: [url]http://www.daniweb.com/software-development/python/threads/191210/867414#post867414[/url] | |
Re: [QUOTE=vegaseat;1462217]I remember the days when restaurants used to serve chicken liver. Now most folks throw the stuff away. Actually, I feel sorry for the mechanic that has to do the separation. :)[/QUOTE]You got that wrong, it's a mecanic, not a mechanic. | |
Re: I am ready to meet my maker, but whether my maker is prepared for the great ordeal of meeting me is another matter. Winston Churchill | |
Re: I like: [B]Spamming for Fairfax Homes[/B] or [B]Spamming for windshield repair St Louis[/B] or [B]Spamming for dentist new york [/B] Have you no shame? | |
Re: Carbon is actually a fairly rare element. Elements like silicon, aluminum and iron are much more common. So yes, the robot would have a much better chance to survive once given enough intelligence. The robot could eventually reach the idea that there is no sense to waste that precious carbon … | |
You can download the matplotlib free from: [url]http://matplotlib.sourceforge.net/[/url] It has, amongst many other things, the module pylab that allows for high quality plotting of data. All you have to do is to feed it a list of x values and the corresponding list of y values calculated from the x … | |
Re: [COLOR="Green"]Hint[/COLOR] common letter frequency orders: English --> '[COLOR="Red"]ETAOIN SHRDLU[/COLOR]' | |
Re: What happens to a string that should contain a newline character? | |
Re: I think I would pick Liberty over any of those choices! | |
Re: I took a look at BioPython, very nice work they have done! | |
Re: [QUOTE=BrytonTaylor;1215839]family guy and grey's anatomy[/QUOTE]You must be from Chicago is a great show. | |
Re: When I grew up, our neighborhood was so poor, that even the rainbow came only in black and white! | |
Re: I saw Gallagher on TV once, what a riot! People in the front rows had to cover with plastic, as he was hitting those water melons on stage with a big hammer. | |
Re: Directed at printing.host Don't you just hate signature spammers! They make the pasta you ate come right back up again! Who the heck cares about the cheap bumper stickers they peddle. |
The End.