Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Change the program so that it keeps a count of the number of times it took you to guess the name, and then outputs the total when you guess correctly
- guess = input("guess my name ")
- count = 1
- while guess != "Martin":
- guess = input("wrong - guess again ")
- count = count + 1
- print("well done")
- print("You took " + str(count) + " attempts")
Advertisement
Add Comment
Please, Sign In to add comment