More help
Answered
My code:
import random
k = random .randint(1,100)
while True:
n = int(input('Make a guess: '))
if n == k:
'#count(#Make a guess'
print("Bravo! You did it in"(print'#Numbers of ("Make a guess")'))
break
elif n < k:
print('Too small')
else:
print('Too large')
My error message:
File "C:/Users/Xudong/Desktop/python/guess_number.py", line 7
print("Bravo! You did it in"(print'#Numbers of ("Make a guess")'))
^
SyntaxError: invalid syntax
Please sign in to leave a comment.
???
Hi,
Try running the code in the system terminal (outside of PyCharm). Do you have the same error?
If so, then it means that the problem is not related to PyCharm.