Advertisement
Juan101

while

Dec 8th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. contar = []
  2. intento = input("adivina mi nombre > ")
  3. while intento != "Martin" and intento != "martin":
  4.     intento = input("error, adivina de nuevo > ")
  5.     contar.append(intento)
  6. conteo = 1
  7. for intento in contar:
  8.     conteo = conteo + 1
  9.    
  10. print("bien hecho en " + str(conteo) + " intentos adivinaste mi nombre")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement