I've been testing stuff with modules specifically time module, and I tried doing "Else", but I just get a syntax error over the "Else", I've looked over the internet a lot, and on here, and I can't find anything, so I decided to ask Myself, I'm probably going to sound like the stupidest person on earth because of this.
Here's my code,
import time
input ("Hello, would you like to sleep?")
if input == "Yes":
time.sleep(0.5)
print("Sleeping.")
print("Sleeping..")
print("Sleeping...")
print("You have awoken!")
else:
print("Alright.")
Aucun commentaire:
Enregistrer un commentaire