Search This Blog

Wednesday, 8 May 2024

Python Course lesson 1 Printing, user input, comments, modules and Timer and waiting functions

 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

how to implement YOLOv3 using Python and TensorFlow

Object Detection with YOLOv3 Introduction YOLOv3 (You Only Look Once version 3) is a real-time object detection algorithm that can detect ob...