elena_gancedo

While_loops

Jul 4th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. guess = input("Guess my name: ")
  2. count = 1
  3. while guess != "Elena":
  4.     count = count + 1  
  5.     guess = input("Wrong - Guess again: ")
  6. if count == 1:    
  7.     print("Well done. The number of times it took you to guess my name have been " + str(count))
  8. else:
  9.     print("Well done. The number of times it took you to guess my name have been " + str(count))
Add Comment
Please, Sign In to add comment