-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinput.py
More file actions
20 lines (16 loc) · 732 Bytes
/
input.py
File metadata and controls
20 lines (16 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#Getting input from the keybaord
#variable=input(prompt)
name=input('What is your name? ')
age=input('What is your age? ')
town=input('What town do you live in? ')
print('Your name is ',name,', you are ', age,', and you live in ',town,'.', sep='')
#Everything entered in input variables are strings, meaning if you need to use them in math equations it won't work.
#To address this you can set a variable as an integer (whole number) or a float (decimal number) when it is input
#name = input('What is your name? ')
#age = int(input('What is your age? '))
#income = float(input('What is your income? '))
#Display data
#print('Here is the data you entered: ')
#print('Name: ', name)
#print('Age: ', age)
#print('Income: ',income)