notaverygoodprogrammer
Coder
Hi, I'm working on a small game where the computer generates a number, and you have to input (like guess) a random number. Then, the computer will tell you whether the guessed number is too big or too small, or if you guessed it right.
I might not have imported the random number correctly, but the current issue I'm dealing with is SyntaxError. How do I fix my code? Are there any additional problems?
Thanks.
I might not have imported the random number correctly, but the current issue I'm dealing with is SyntaxError. How do I fix my code? Are there any additional problems?
Python:
#im trying to generate a random number here
import random
beg = 1
end = 100
random_integer = random.randint(beg, end)
#apparently there is a syntax error below on the innum == random_integer place but there might be more
input("input a random number")
input = innum
if innum < random_integer:
print("your number is too small")
elif innum > random_integer:
print("your number is too big")
else innum == random_integer:
print("you guessed right")
Thanks.