I am writing a code for a basic guessing game where the user guess a number this is my current code.
x = int(input())
import random
num = random.randrange(0, 100)
if x > num:
print("Too high!")
if x < num:
print("Too low!")
if x == num:
print("Correct!")
I have tried to make the input a function instead and inserting it into a while
loop. Along with trying to simply use more inputs but it won't print the result until after both inputs are entered. How do I make the user-input change while the code is running?