Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

please use python algorithm for their weigh and height, calculate and display th

ID: 3914685 • Letter: P

Question

please use python algorithm

for their weigh and height, calculate and display their BMI, and display a message indicating whether the person has optimal weight, is underweight, or is overweight. A sedentary person's weight is considered optimal if his or her BMI is between 18.5 and 25. If the BMI is less than 18.5, the person is considered underweight. If the BMI value is greater than 25, the person is considered overweight. 2) A software company sells a package that retails for S 99. Quantity discounts are given according to the following table: Quantity 10-19 20-49 50-99 100 or more Discount 20% 30% 4000 5090 Write a program that asks the user to enter the number of packages purchased. The program should then display the amount of the discount (if any) and the total amount of the purchase after the discount. Use nested if else statement. 3) Write Python program that ask the user to enter his/her first name and last name and display the following: full name, initials (first and last), and length of full name.

Explanation / Answer

package = 99

no_of_packages = input("enter the no of packages")

if (no_of_packages < 10):

discount = 0

elif (no_of_packages >= 10) and (no_of_packages < 20):

discount = 0.2 * package

elif (no_of_packages >= 20) and (no_of_packages < 50):

discount = 0.3 * package

elif (no_of_packages >= 50) and (no_of_packages < 100):

discount = 0.4 * package

else :

discount = 0.5 * package

print("the discount is ")

print(discount)

final_purchase = package - discount

print("the total amount oof purchase after the discount")

print(final_purchase)