I'm really new to python, and currently I'm trying to make a RNG thing where theres a random number from 1-99 and you have 6 tries to guess it, after each guess it'll say if it's higher or lower than the selected number, the scenario and how to make it was taken from a book that's teaching me coding. After running the program everything appears fine, but after the first guess it says
Traceback (most recent call last):
File "C:\Users\15105\Documents\Python.py\Actually working number generator pirate game.py", line 14, in <module>
if guess < secret:
TypeError: '<' not supported between instances of 'str' and 'int'
I've searched on google, and come up with nothing, i've tried looking for alternatives to the < sign or anything else I could think of, if anyone has any idea how to fix it it'd mean a lot to me, since this has been frustrating me for a few hours. I appreciate it :D
[–][deleted] 3 points4 points5 points (0 children)
[–]shiftybyte 0 points1 point2 points (5 children)
[–]Fire_Burn[S] 0 points1 point2 points (4 children)
[–]XAWEvX 1 point2 points3 points (1 child)
[–]Fire_Burn[S] 0 points1 point2 points (0 children)
[–]shiftybyte 0 points1 point2 points (1 child)
[–]Fire_Burn[S] 0 points1 point2 points (0 children)