Skip to content

Commit 7bf8017

Browse files
Nour-Aldein2Nour-Aldein2
authored andcommitted
BMI
0 parents  commit 7bf8017

File tree

4 files changed

+168
-0
lines changed

4 files changed

+168
-0
lines changed

._BMI.py

4 KB
Binary file not shown.

._read.me.py

4 KB
Binary file not shown.

BMI.py

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
# # Odd or even
2+
# number = int(input("Which number do you want to check? "))
3+
# number = int(number)
4+
#
5+
# if number % 2 == 0:
6+
# print("This is an even number.")
7+
# else:
8+
# print("This is an odd number.")
9+
#
10+
#
11+
# # BMI (body mass index)
12+
# height = float(input("enter your height in m: "))
13+
# weight = float(input("enter your weight in kg: "))
14+
#
15+
# w = float(weight)
16+
# h = float(height)
17+
#
18+
# BMI = w/(h**2)
19+
# BMI_int = round(BMI)
20+
#
21+
# if BMI_int < 18.5:
22+
# print(f"Your BMI is {BMI_int}, you are underweight")
23+
# elif BMI_int < 25:
24+
# print(f"Your BMI is {BMI_int}, you have a normal weight")
25+
# elif BMI_int < 30:
26+
# print(f"Your BMI is {BMI_int}, you are slightly overweight")
27+
# elif BMI_int < 35:
28+
# print(f"Your BMI is {BMI_int}, you are obese")
29+
# else:
30+
# print(f"Your BMI is {BMI_int}, you are clinically obese")
31+
#
32+
#
33+
# # Leap year
34+
# year = int(input("Which year do you want to check? "))
35+
#
36+
# if year % 4 == 0:
37+
# if year % 100 == 0:
38+
# if year % 400 == 0:
39+
# print('Leap year.')
40+
# else:
41+
# print('Not leap year')
42+
# else:
43+
# print('Leap year.')
44+
# else:
45+
# print('Not leap year.')
46+
#
47+
#
48+
# # Python pizza
49+
# print("Welcome to Python Pizza Deliveries!")
50+
# size = input("What size pizza do you want? S, M, or L ")
51+
# add_pepperoni = input("Do you want pepperoni? Y or N ")
52+
# extra_cheese = input("Do you want extra cheese? Y or N ")
53+
# price = 0
54+
# if size == "L":
55+
# price += 25
56+
# elif size == "M":
57+
# price += 20
58+
# elif size == "S":
59+
# price += 15
60+
#
61+
# if add_pepperoni == "Y":
62+
# if size == "S":
63+
# price += 2
64+
# else:
65+
# price += 3
66+
#
67+
# if extra_cheese == "Y":
68+
# price += 1
69+
#
70+
# print("Your final bill is: ${}.".format(price))
71+
#
72+
#
73+
#
74+
# # Love calculator
75+
# print("Welcome to the Love Calculator!")
76+
# name1 = input("What is your name? \n")
77+
# name2 = input("What is their name? \n")
78+
#
79+
# o1 = o2 = 0
80+
# for i in "true":
81+
# o = 0
82+
# for j in name1.lower():
83+
# if j == i:
84+
# o +=1
85+
# for j in name2.lower():
86+
# if j == i:
87+
# o +=1
88+
# o1 += o
89+
#
90+
# for i in "love":
91+
# o = 0
92+
# for j in name1.lower():
93+
# if j == i:
94+
# o +=1
95+
# for j in name2.lower():
96+
# if j == i:
97+
# o +=1
98+
# o2 += o
99+
#
100+
#
101+
# love_score = str(o1) + str(o2)
102+
# love_score = int(love_score)
103+
#
104+
# if love_score < 10 or love_score > 90:
105+
# print(f"Your score is {love_score}, you go together like coke and mentos.")
106+
# elif love_score > 40 and love_score < 50:
107+
# print(f"Your score is {love_score}, you are alright together.")
108+
# else:
109+
# print(f"Your score is {love_score}.")
110+
111+
112+
print('''
113+
*******************************************************************************
114+
| | | |
115+
_________|________________.=""_;=.______________|_____________________|_______
116+
| | ,-"_,="" `"=.| |
117+
|___________________|__"=._o`"-._ `"=.______________|___________________
118+
| `"=._o`"=._ _`"=._ |
119+
_________|_____________________:=._o "=._."_.-="'"=.__________________|_______
120+
| | __.--" , ; `"=._o." ,-"""-._ ". |
121+
|___________________|_._" ,. .` ` `` , `"-._"-._ ". '__|___________________
122+
| |o`"=._` , "` `; .". , "-._"-._; ; |
123+
_________|___________| ;`-.o`"=._; ." ` '`."\` . "-._ /_______________|_______
124+
| | |o; `"-.o`"=._`` '` " ,__.--o; |
125+
|___________________|_| ; (#) `-.o `"=.`_.--"_o.-; ;___|___________________
126+
____/______/______/___|o;._ " `".o|o_.--" ;o;____/______/______/____
127+
/______/______/______/_"=._o--._ ; | ; ; ;/______/______/______/_
128+
____/______/______/______/__"=._o--._ ;o|o; _._;o;____/______/______/____
129+
/______/______/______/______/____"=._o._; | ;_.--"o.--"_/______/______/______/_
130+
____/______/______/______/______/_____"=.o|o_.--""___/______/______/______/____
131+
/______/______/______/______/______/______/______/______/______/______/_____ /
132+
*******************************************************************************
133+
''')
134+
print("Welcome to Treasure Island.")
135+
print("Your mission is to find the treasure.")
136+
137+
#https://www.draw.io/?lightbox=1&highlight=0000ff&edit=_blank&layers=1&nav=1&title=Treasure%20Island%20Conditional.drawio#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D1oDe4ehjWZipYRsVfeAx2HyB7LCQ8_Fvi%26export%3Ddownload
138+
139+
#Write your code below this line 👇
140+
141+
a = input('You\'re at a crossroad. Where do you want to go? Type "left" or "right"')
142+
if a.lower() != 'left':
143+
print('Fall into a hole. Game Over.')
144+
exit()
145+
146+
147+
b = input('You\'ve come to a lake. There is an island in the middle of the lake. Type "wait" to wait for a boat. Type "swim" to swim across.')
148+
if b.lower() != 'wait':
149+
print('Attacked by trout. Game Over.')
150+
exit()
151+
152+
c = input("You arrive at the island unharmed. There is a house with 3 doors. One red, one yellow and one blue. Which colour do you choose?")
153+
154+
if c.lower() == 'red':
155+
print('Burnd by fire. Game Over')
156+
exit()
157+
elif c.lower() == 'blue':
158+
print('Eatten by beasts. Game Over.')
159+
exit()
160+
elif c.lower() == 'yellow':
161+
print('You Win!')
162+
else:
163+
print('Game Over.')
164+
exit()
165+
166+

read.me.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This is a description of the projects of each file in this repository. If there is a need to write more descriptions, there will be an individual read.me file for that project.
2+
1- BMI: as the name suggests, is a python calculator to find the body mass index.

0 commit comments

Comments
 (0)