No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Re:
This snippet defines a function restart_program() which restarts your python program from within your python program. |
|
|
Re:
Here's a simple tutorial on dictionaries in Python: Dictionaries: Dictionaries are similar to other compound types except that they can use any immutable type as an index. One way to create a dictionary is to start with the empty dictionary and add items. The empty dictionary is denoted {}: [CODE]end2sp … |
Hello, I've this lise: [CODE]lst = ['10:User1', '80:User2', '100:User3', '00:User4', '75:User4', '45:User5'][/CODE] I want to print it as: [CODE]100 User3 80 User2 75 User4 45 User5 10 User1 00 User4[/CODE] So, I want to organize them by the number. |
|
Let's say this: [CODE]print """ Wleomce... * To start the quiz press <s> * For more information quiz press <i> * To exit press <q> """ main_menu = raw_input('Your choice: ').lower().strip() if mai_menu == 's': print """\ * Press <n> to write yoyr name. * Press <l> to choice your … |
|
Re:
Ok folks...more help with a programming class... I'm seriously starting to think programming is not for me, but I just want to finish out this class with a decent grade. I'm not looking for answers...just some guidance in the right direction. Here is the problem... As an exercise, write a … |
|
Hi... I've this: [CODE]random_name = ['Mohamed', 'Ahmed','Aboubakr'] print "1: %s 2: %s 3: %s" % (random_name[1], random_name[0], random_name[2])[/CODE] I want to print all the three names but in random way, as: some time: Mohamed, Ahmed, Aboubaker and some time: Mohamed, Aboubaker, Ahmed and some time: Aboubaker, Ahmed, Mohamed and some … |
|
Hi... I want ti contril the while loop, just make it looping just for x times, ex: loop for 5 times and pass to the next code :) |
|
Hi... Let's say that we have this: [CODE]somme = raw_input('1 + 1 = ') if somme == 2: print 'Good - Time For Answer: ' else: print 'False - The Right Answer is: 2 -Time For Answer:'[/CODE] So... how can we get the time for writing any things on raw_input() |
|
Hi... I want to start with PyQt and I don't from where should I beggin !! I'm using Fedora Linux 14 ! |