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)
Comments
Post a Comment