I'm super new to python and I'm just trying to make a very simple random number generator function, but nothing seems to be working, and python just gives me an error every time. Could anyone help with this?
def roll_dice(num):
return random.randint(1, num)
roll_dice(6)
Error Message:
NameError: name 'random' is not defined
Aucun commentaire:
Enregistrer un commentaire