Answers for "how to take input in python on mettl"

3

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)
Posted by: Guest on October-01-2020

Code answers related to "how to take input in python on mettl"

Python Answers by Framework

Browse Popular Code Answers by Language