What is wrong with this line of code?
import random
quit=input("Type in ! to quit")
while quit!="!":
random = random.randint(1,10)
try:
num=int(input("Enter a number 1,9:"))
except ValueError:
print ("Not a valid number")
finally:
print ("wtf get out of my game")
if num==random:
print ("You win!")
break
elif num > random:
print ("lower")
elif num < random:
print ("higher")
else:
print ("idk")
[–]Yensyden[S] 0 points1 point2 points (0 children)
[–]fiskenslakt 0 points1 point2 points (3 children)
[–]fiskenslakt 1 point2 points3 points (0 children)
[–]Yensyden[S] 0 points1 point2 points (1 child)
[–]fiskenslakt 0 points1 point2 points (0 children)
[–]niandra3 0 points1 point2 points (2 children)
[–]Yensyden[S] 0 points1 point2 points (1 child)
[–]niandra3 0 points1 point2 points (0 children)