المشروع عبارة عن آلة حاسبة لاحتياجات الشخص اليومية من السعرات الحرارية حسب نشاطه البدني.
اقتباس
print("WELCOME TO CALORIE CALCULATOR! \n")
weight = float(input("Enter your body weight (Kg): \n"))
height = float(input("Enter your height (Cm): \n"))
age = int(input("Enter your age (Years): \n"))
sex = input("Enter your sex (male or female): \n")if sex.upper()=="male"or sex.lower()=="male":
BMR =(10* weight)+(6.25* height)-(5* age)+5print(f"Your BMR value is {BMR}")elif sex.upper()=="female"or sex.lower()=="female":
BMR =(10* weight)+(6.25* height)-(5* age)-161print(f"Your BMR value is {BMR}")else:print("Error! Please Enter Your Sex!!! \n")
effort = input("Are you anthletic? \n")
num = int(input("How many days do you exercise? \n"))if effort.lower()=="yes":
num >0and num <=7
workout = input("What is nature of your physical activity? (normal or hard) \n")if num >=1and num <=3:if workout.lower()=="normal":print(f"Your daily calorie needs are: {BMR * 1.375} \n")elif workout.lower()=="hard":print(f"Your daily calorie needs are: {BMR * 1.55} \n")else:print(end=" ")elif num >=4and num <=5:if workout.upper()=="normal"or workout.lower()=="normal":print(f"Your daily calorie needs are: {BMR * 1.55} \n")elif workout.lower()=="hard":print(f"Your daily calorie needs are: {BMR * 1.725} \n")else:print(end=" ")elif num >=6and num <=7:if workout.upper()=="normal"or workout.lower()=="normal":print(f"Your daily calorie needs are: {BMR * 1.725} \n")elif workout.lower()=="hard":print(f"Your daily calorie needs are: {BMR * 1.9} \n")else:print(end=" ")else:print(end=" ")elif effort.upper()=="no"or effort.lower()=="no":print(f"Your daily calorie needs are: {BMR * 1.2} \n")else:print(end=" ")
goal = input("""Choose your goal:
...Weight gain (Enter 1)...
...Weight loss (Enter 2)...\n""")if goal.lower()=="1":print("""You should eat more than your daily caloric needs and balance your healthy eating.
Good luck!""")elif goal.lower()=="2":print("""You should eat less than your daily calorie needs by following a healthy and balanced diet.
Good luck!""")else:print(end=" ")
السؤال
Allati Mohamed
المشروع عبارة عن آلة حاسبة لاحتياجات الشخص اليومية من السعرات الحرارية حسب نشاطه البدني.
1 جواب على هذا السؤال
Recommended Posts
انضم إلى النقاش
يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.