python input function code example
Example 1: python input
name = input('Please enter your name: ')
print(name)
if name == 'Joe':
print('Joe Mama')
Example 2: python get input
txt = input("Type something to test this out: ")
print("Is this what you just said? ", txt)
Example 3: input in python
name = input("What is your name?\n")
print("You said your name was " + name)
number = int(input("Please select a random number:\n"))
Example 4: how to take input in python
a = input("Enter a string: ")
print("String is: ", a)
b = int(input("Enter an integer: "))
print("Integer is: ", b)
c = float(input("Enter a float value: "))
print("Float value is: ", c)
Example 5: python how to use input
x = input("your question here")
print(x)
Example 6: python input function
answer = input('What is your name?')