No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
4 Posted Topics
| |
im writing a personal program thats storing scores. The layout is done using Tkinter using labels buttons and entry widgets, however, because there are a lot of entry widgets needing created i just stuck their creation in a loop, [code] for m in range(1,10): self.input_score = Entry(frame,width=6) self.input_score.grid(column=5, row=m) [/code] … | |
Re: [code] from random import * data = ["apples","orange","melon"] data2=[] playerchoice= raw_input("enter your choice: ") for i in data: if playerchoice != i: data2 = data2 + [i] compchoice = data2[randint(0,2)] [/code] that will get both choices you just need to do the compare bit i dont know what the winning … | |
Re: run it using IDLE? and the result printed will stay on screen? |
The End.