Skip to content

Instantly share code, notes, and snippets.

@rok-povsic
Created January 24, 2019 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rok-povsic/81e5d6264042ad120d13b301824b57ed to your computer and use it in GitHub Desktop.
Save rok-povsic/81e5d6264042ad120d13b301824b57ed to your computer and use it in GitHub Desktop.
skrito_stevilo = 6
poskus = int(input("Vpiši število: "))
stevilo_poskusov = 1
while True:
if skrito_stevilo == poskus:
print("Čestitke, zadeli ste skrito število")
break
elif stevilo_poskusov == 5:
print("Nimate več poskusov")
break
else:
print("Napačno")
poskus = int(input("Ponovno vpiši število: "))
stevilo_poskusov = stevilo_poskusov + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment