Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
GO-4-UR-GOAL-MQTT-Integrative-Project/topics.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
59 lines (55 sloc)
1.97 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def topic4(weight,walkingTime,heartRate): | |
gender = input("Are you male or female: ") | |
age = int(input("What is your age: ")) | |
vo2Max = 132.853 - (0.0769 * weight) - (0.3877 * age) + (number) - (3.2649 * walkingTime) - (0.1565 * heartRate) | |
result = print(vo2Max) | |
if gender == "Male": | |
number = 6.315 | |
if age <= 29: | |
if result <= 25: | |
print("Poor") | |
elif result >25 and result <=34: | |
print("Fair") | |
elif result > 34 and result <= 44: | |
print("Average") | |
elif result > 44 and result <= 53: | |
print("Good") | |
elif result > 53: | |
print("Excellent") | |
if age >= 30 and age <=39: | |
if result <= 23: | |
print("Poor") | |
if result > 23 and result <= 30: | |
print("Fair") | |
if result > 31 and result <= 42: | |
print("Average") | |
if result > 42 and result <= 50: | |
print("Good") | |
if result > 50: | |
print("Excellent") | |
elif gender == "Female": | |
if age >= 13 and age <= 19: | |
if result <= 25: | |
print("Poor") | |
elif result >25 and result <=34: | |
print("Fair") | |
elif result > 34 and result <= 44: | |
print("Average") | |
elif result > 44 and result <= 53: | |
print("Good") | |
elif result > 53: | |
print("Excellent") | |
if age >= 20 and age <= 29: | |
if result >= 24 and result <= 28 : | |
print("Poor") | |
if result >= 29 and result <= 33: | |
print("Fair") | |
if result > 33 and result <= 37 : | |
print("Average") | |
if result > 37 and result <= 41: | |
print("Good") | |
if result > 41: | |
print("Excellent") | |
else: | |
print("Please Enter Either Male Or Female Please: ") | |
topic4(165,18,20) | |