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

Don’t Sweat It – Chill with Crompton Air Cooler Deals

 ðŸŒž Don’t Sweat It – Chill with Crompton Air Cooler Deals  More Details : https://www.amazon.in/s?k=laptops+under+70000&crid=29QIFPXQYB3...