Original Post
Hi! I'm a super noob just starting to learn python and programming in general. My problem is trying to verifiy a random number
but ending up with invalid syntax.
import random
heroAttack = random.randint (1, 10)
if heroAttack > 5
print (You hit!)
else:
print (You miss.)
I always get an invalid syntax at the number 5. Could somebody tell me what is wrong?
but ending up with invalid syntax.
import random
heroAttack = random.randint (1, 10)
if heroAttack > 5
print (You hit!)
else:
print (You miss.)
I always get an invalid syntax at the number 5. Could somebody tell me what is wrong?