Hi, I’m trying to write a very simple random generator to choose between three movie suggestions.
This is my code:
import random
chosen_movie = random.randint(1,3)
if chosen_movie == 1:
print("Rimini")
elif chosen_movie == 2:
print("Wien retour")
elif chosen_movie == 3:
print("Petit Maman")
I originally wanted to use the Codecademy workspace for this, but got this error:
"python3: can't open file 'random': [Errno 2] No such file or directory"
The code runs fine (as far as I can tell lol) in VScode and on a random online python compiler I googled quickly, though.
I’ve tried googling and searching the forum but haven’t found an explanation (at least not one I understand), so could anybody help me out what seems to be the problem here? Apologies if this has been asked before.
Thank you so much!