Skip to content

Instantly share code, notes, and snippets.

@davidbj
Created February 25, 2016 09:03
Show Gist options
  • Select an option

  • Save davidbj/6eea2f32e5e5568b2cf9 to your computer and use it in GitHub Desktop.

Select an option

Save davidbj/6eea2f32e5e5568b2cf9 to your computer and use it in GitHub Desktop.
Guess the number
def fun():
"""Guess the number.
Three chances Yo.
"""
constant=4
for i in range(3):
number = int(input("Please input a number:"))
if num == constant:
msg = "congratulations! you win!"
return msg
else:
msg = "Oops! you fail!"
return msg
fun()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment