Python program to take inputs from the user
ADVERTISEMENTS
Python program to take inputs from the user. There are you will learn how to take inputs from the user in Python language.
Let us understand this example through the Python program:
# Python program to take inputs from the user
print("Enter the integer value::")
p = int(input())
print("Enter the float value::")
q = float(input())
print("Enter the string value::")
r = str(input())
print("\nThe integer input is:\n", p, "\n")
print("The float input is:\n", q, "\n")
print("The string input is:\n", r, "\n")
Output:
Enter the integer value::
5
Enter the float value::
7.5
Enter the string value::
hello
The integer input is:
5
The float input is:
7.5
The string input is:
hello