Here is the code which we studied in Python course 1st lesson
# this line add the function 'sleep' to the program
from time import sleep
# this line takes input from the user
name = input("Your name: ")
# this sleep function wait for 1 second ----syntax ---- sleep('seconds')
sleep(1)
print("Waiting 1...")
sleep(1)
print("Waiting 2...")
sleep(1)
print("Waiting 3...")
sleep(1)
print("Waiting 4...")
sleep(1)
print("Waiting 5...")
sleep(1)
# this line print the text which we pass into it, here text is -> name -> name contains the value ' Suryansh ' or whatever you type in input
print(name)
No comments:
Post a Comment