SHARE
TWEET

4.2

MarkO-FL May 19th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. guess = input("Please guess my name")
  2. count = 0
  3. while guess != "Mark":
  4.     guess = input("Wrong - guess again ")
  5.     count = count + 1
  6. print("You guessed right")
  7. print("My name is  " + guess)
  8. print("You achieved this in " + str(count + 1) + " guesses")  
  9.  
  10.  
  11.  
  12. Please guess my nameHal
  13. Wrong - guess again Hal
  14. Wrong - guess again Hal
  15. Wrong - guess again Mark
  16. You guessed right
  17. My name is  Mark
  18. You achieved this in 4 guesses
  19. >>>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top