+ 2
Why this code is not run ??
import random w_n=random.randint(1,100) game_over= False n=int(input("inpur number 1 to 100 : ")) g=1 while not game_over : if n==w_n: print (f"you win & you guess {g} time") game_over = True else : if n < w_n: print ("too low") g+=1 n=int(input("guess again: ")) else : print ("too high") g+=1 n=int(input("guess again: "))
2 Answers
+ 1
guess the number is not possible on SL with Python.
+ 1
I believe you would have to replace:
random.randint(1,100)
with:
w_n = random.randint(1,100)