Answers for "default input type in python"

93

python input

#Collecting The Input As A Variable:#
name = input('Please enter your name: ')
#Printing The Variable:#
print(name)
#Checking The Variable And Printing Accordingly:#
if name == 'Joe':
  print('Joe Mama')
Posted by: Guest on August-09-2020
2

python default input

# Python 3:
age = input('Enter your age: ') or 18

# Older versions:
age = int(raw_input('Enter your age: ') or 18)
Posted by: Guest on June-17-2020
11

python input function

answer = input('What is your name?')
Posted by: Guest on April-24-2020

Code answers related to "default input type in python"

Python Answers by Framework

Browse Popular Code Answers by Language