Advertisement
Fahim999

Untitled

Dec 3rd, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. count=1
  2.  
  3. guess = input('Please guess my name: ')
  4. while guess != "Fahim" and guess != "fahim":
  5.     guess = input('Sorry, that is not right. Please try again: ')
  6.     count=count+1
  7. print(guess,'is correct. Well done!')
  8. print(' ')
  9.  
  10. if count == 1:
  11.     text='guess'
  12. else:
  13.     text='guesses'
  14.  
  15. print('It took you',count,text,'to get it right!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement