Beginner
Karthik Reddy
challakarthik at gmail.com
Thu Nov 20 01:40:09 EST 2014
More information about the Python-list mailing list
Thu Nov 20 01:40:09 EST 2014
- Previous message (by thread): Most gratuitous comments
- Next message (by thread): Beginner
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi all
I am python beginner I am trying the below code and getting incorrect syntax in python (3.3.2)
number = 23
running = True
while running:
guess = int(raw_input('Enter an integer : '))
if guess == number:
print ("Congratulations, you guessed it.")
running = False # this causes the while loop to stop
elif guess < number:
print ("No, it is a little higher than that.")
else:
print ("No, it is a little lower than that.")
else:
print ("The while loop is over.")
# Do anything else you want to do here
print ("Done")
Please help me with this
Thank you in advance
- Previous message (by thread): Most gratuitous comments
- Next message (by thread): Beginner
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list