Skip to content

Commit d3feb73

Browse files
YouTubeYouTube
authored andcommitted
Source code for up to part 13
1 parent cc242e9 commit d3feb73

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

bmr.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
# Basal Metabolic Rate Calculator
22

3-
weight = int(input("Enter your weight in KG: \n"))
4-
height = int(input("Enter your height in cm: \n"))
5-
age = int(input("Enter your age in years: \n"))
6-
isMale = str(input("Are you male? (y/n)"))
3+
4+
5+
def takeInputs():
6+
weight = int(input("Enter your weight in KG: \n"))
7+
height = int(input("Enter your height in cm: \n"))
8+
age = int(input("Enter your age in years: \n"))
9+
isMale = str(input("Are you male? (y/n)"))
10+
11+
takeInputs()
712

813
if isMale == "y":
914
isMale = True

functions.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
def add():
2+
return 2 + 3
3+
4+
def multiply():
5+
return 2 * 3
6+
7+
def cube():
8+
return 2 ** 3

0 commit comments

Comments
 (0)