Hey this program I wrote is horrible, and I already re-wrote it and it works thanks to one of the great answers, but the site has informed me that what I am asking is unclear, so I will take the liberty of editing it. What I was trying to ask was how do I make a game where you guess a number between 1 and 20. And also if I was correctly using the random number generating commabnd I am sorry I didn't clarify in my writing
from random import randint
Number_list=['(randint(0,20))']
a1=input("Guess a number between 1 and 20")
if (a1 == Number_list) :
print("You are right!")
else :
print("Incorrect nice try!")
Aucun commentaire:
Enregistrer un commentaire