mardi 1 août 2017

How do I generate a random 4 digit number and store it as a variable in python?

I'm trying to make a guess the number game in Python, but I'm having trouble. Here is what I have so far:

enter code here import random
number = random.randit(1111,9999)
print(number)

But for some reason I get an error saying something about random cannot be assigned to randit. Any help please?




Aucun commentaire:

Enregistrer un commentaire