Ask coding questions
I need help. My teacher is not here and i am trying to get the code for a phyton guassing game for fee
i fixed it
replace line 23 with print("it took you",tries,"tries to guess the number"
@Marsexplorer it will only work if tries is a string. otherwise, set try to a string
i mean it will only work if random_number is a sring
to set a non-string to a string, use str(non-string), replacing non string with what you want to turn into a string
replace line 23 with print("It took you " + str(tries)+" tries to guess the number!")
"f-strings" are not a thing in Python 2. To use them move to a Python 3 repl.
remove the f on line 23
Check this out: https://inventwithpython.com/chapter4.html