Wikibooks example doesn't work
Seymore4Head
Seymore4Head at Hotmail.invalid
Wed Aug 6 22:58:51 EDT 2014
number = 7
guess = -1
count = 0
print("Guess the number!")
while guess != number:
guess = int(input("Is it... "))
count = count + 1
if guess == number:
print("Hooray! You guessed it right!")
elif guess < number:
print("It's bigger...")
elif guess > number:
print("It's not so big.")
if count > 3:
print("That must have been complicated.")
else:
print("Good job!")
http://en.wikibooks.org/wiki/Non-Programmer%27s_Tutorial_for_Python_3/Decisions
Why not?
I think I know why it isn't working, but I don't know enough yet on
how it should work.
The If statement isn't getting read.
More information about the Python-list
mailing list