Answers for "take input pythopn"

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
0

Getting Input in Python

print("What is your name?")
name = input()
print(name)  # This will print out whatever the user typed
Posted by: Guest on October-17-2021

Python Answers by Framework

Browse Popular Code Answers by Language