Python input() and print() functions

 Python input() and print() functions

Two built-in functions to handle input from a user and system.
input(prompt): To accept input from a user. user enter input from keyboard
print():print function is used To display output on the console/screen.

Ex:
# take three values from user
name = input("Enter Employee Name: ")
salary = int(input("Enter salary: "))
company = input("Enter Company name: ")
# Display all values on screen
print("Printing Employee Details")
print("Name   Salary   Company")
print(name,'\t',salary,'\t',company)

No comments:

Post a Comment

Latest Post

How to Generate Barcode and QR code For Our Products

 మీ products కి barcode / QR code generate చేయాలంటే OPTION 1: ONLINE (No Coding – Quick) Best for small shops / beginners 👉Free websites: T...