-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample
More file actions
33 lines (22 loc) · 792 Bytes
/
example
File metadata and controls
33 lines (22 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""This is a simple program that read data about the user."""
name = input( 'please enter your name: '.capitalize() )
gender = input('please specify you gander(m/f): '.capitalize())
if gender[0] == 'm' or gender[0] == 'M':
print('Greetings Mr. ', name)
else:
is_married = input( 'are you married(Y/N)!: '.capitalize() )
if is_married[0].upper() == 'Y':
print('Greetings Mrs. ', name)
else:
print(f"Greetings Ms.{name}")
temp = input('Enter Tempreture(20c/20f): ')
letter = temp[-1]
num = int(temp[0:-1])
if letter.lower() == 'c':
fahrenheit = num * 9/5 + 32
print(f'{num} Celsius is equal to {fahrenheit} Fahrenheit')
else:
celsius = (num - 32) * 9/5
print(f'{num} Fahrenheit is equal to {celsius} Celsius')
print(celsius)
print(fahrenheit)