guess game in python

Solutions on MaxInterview for guess game in python by the best coders in the world

showing results for - "guess game in python"
Pacome
05 Feb 2020
1# Guess the Developer Name 
2dname="Zaheer khan"
3counter=4
4while True:
5      username=input("Enter Developer Name: ")
6      if username==dname:
7          print("You win the game")
8          break
9      else:
10          counter=counter-1
11          if counter>0:
12              print("Wrong name try again! ","(You have %d"%counter," left)")
13          else:
14              print("Game over".upper())
15              break
similar questions
queries leading to this page
guess game in python