This question already has an answer here:
- How can I read inputs as numbers? 10 answers
I am creating a rock, paper, scissor game i just try the random lib but this what happens
C:\Users\Timothy\Desktop>python app1.py
2
Please choose 1=Rock, 2=Paper, 3=Siccors2
and this is the code that I create
import random
ai = (random.randint(1,3))
print(ai)
play = input("Please choose 1=Rock, 2=Paper, 3=Siccors")
if ai == play:
print("Hello")
Aucun commentaire:
Enregistrer un commentaire