I need help with the function but i have no clue how to?.. the function should generate a random number between 1 and 100 and then allow the user to guess the number. After each guess it should display if the guess is too high or low and if they guess it in 7 chances then it should say you win or if they dnt it should say you loose....
import random
number=random.randint(1,100)
guess=input("please enter your guess: ")
if guess<number:
print "too low"
if guess>number:
print"too high"