Re: Simple program question.

2013-06-11 Thread russ . pobox
input() is a function which returns a string. You can assign this return value to a variable. That's what variables are for. option = input() Now you can use the variable named option in place of all those calls to input(). i.e: ...instead of.. if input() == 'parry': # etc ...do this...

Re: Simple program question.

2013-06-10 Thread eschneider92
No. -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple program question.

2013-06-09 Thread Chris Angelico
On Mon, Jun 10, 2013 at 1:06 PM, wrote: > if input()!=('duck', 'parry'): > if input()=='duck': > if input()=='parry': Every time you call input(), it waits for you to type something. You want to record what the person typed and then use it in each place. Have you been taught a means of doing thi

Simple program question.

2013-06-09 Thread eschneider92
How do I make it so I only have to type in 'parry' once? import random words=['hemisses', 'hestabsyou'] randomizer=random.choice(words) if input()!=('duck', 'parry'): print('try again') if input()=='duck': print(randomizer) if randomizer=='hemisses': results=['you should have r