input python function code example
Example 1: python input
name = input('Please enter your name: ')
print(name)
if name == 'Joe':
print('Joe Mama')
Example 2: 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 3: python how to use input
x = input("your question here")
print(x)
Example 4: python input function
answer = input('What is your name?')
Example 5: python input
a = float(input("Input first number: "))
b = float(input("Input second number: "))
c = float(input("Input third number: "))
if a > b:
if a < c:
median = a
elif b > c:
median = b
else:
median = c
else:
if a > c:
median = a
elif b < c:
median = b
else:
median = c
print('The median is: ', median)