Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to take input in python

# Taking string input
a = input("Enter a string: ")
print("String is: ", a)

# Taking integer input
b = int(input("Enter an integer: "))
print("Integer is: ", b)

# Taking float input
c = float(input("Enter a float value: "))
print("Float value is: ", c)
 
PREVIOUS NEXT
Tagged: #input #python
ADD COMMENT
Topic
Name
5+2 =