-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWeight Converter.py
More file actions
59 lines (47 loc) Β· 1.87 KB
/
Weight Converter.py
File metadata and controls
59 lines (47 loc) Β· 1.87 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
print('Hello There!!! I\'m WALTER, Your Weight Converter Bot π€')
name = input(f'Can I get to know your name please π€? ')
print(f'Hello {name}, Are you ready to convert your Weight')
_y = 'Yes'
_n = 'No'
print(_y)
print(_n)
ans = input('>> ')
while True:
if ans.lower() == 'yes':
que = print('Do you want Your Weight in Kilograms or Ounces : ')
rep_ = input('')
try:
rep_
except:
print('Check what you entered ')
if rep_.lower() == 'kilograms':
kil_ = input(' Enter your weight in Pounds: ')
elif rep_.lower() == 'ounces':
oun_ = input('Enter your weight in Pounds: ')
if rep_.lower() == 'kilograms':
try:
kilv_ = int(kil_) / 2.205
except:
print('Enter A Valid Value')
continue
print(f' Your weight in Kilograms is {kilv_} kg')
if kilv_ >= 75:
print('Chimmmooooo!!!πββοΈπββοΈπββοΈ Oga go loose weight oooπ€£π€£π€£')
elif kilv_ <= 74:
print('Your Weight is Nice. Don\'t add more oooππ')
break
if rep_.lower() == 'ounces':
try:
ounv_ = int(oun_) * 16
except:
print('Enter A Valid Value')
continue
print(f'Your weight in Ounces is {ounv_} oz')
if ounv_ >= 2645.45:
print('Chimmmooooo!!!πββοΈπββοΈπββοΈ Oga go loose weight oooπ€£π€£π€£')
elif ounv_ <= 2644.44:
print('Your Weight is Nice. Don\'t add more oooππ')
break
elif ans.lower() == 'no':
print('Why are you afraid to check your Weight naπ€£π€£ you oversized pig. I\'ll not waste my time giving you another tryπ€£π€£')
break