Advertisement
zhongnaomi

guess and count

Jan 17th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. guess = input ("guess what I like to buy today ? " )
  2. count = 0
  3. while guess !="apple" and guess !="Apple" :
  4.     guess = input ( " Wrong -  guess again  ")
  5.     count = count +1
  6. print ( " Well done" )
  7. print ( " you guessed " + str(count + 1 )  + " times. " )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement