Question: Need Help with Python Assignment The prices of items sold at a bookstore are marked up by a given percentage rate (e.g. 20.5%). After marking
Need Help with Python Assignment
-
The prices of items sold at a bookstore are marked up by a given percentage rate (e.g. 20.5%). After marking up the prices, each item is put on sale at a discount at a given rate (e.g. 5.8%). CIT137B-Assignment 2 Module 2 Page
-
Ask the user for the required input (original price, mark up rate, and discount rate).
-
Display a header as shown in the sample interaction, below.
-
Display the values of each of the items you asked from the user (see the sample interaction).
-
Find and display the final selling price.
-
Dont forget to use descriptive variable names. Think about the Input, processing and output steps needed to solve this problem. Format all output with 2 digits after the decimal point.
-
Value of can be estimated using a simple formula. such as: 4 x (1 1/3 + 1/5 1/7 + 1/9 1/11 + 1/13). The program should calculate and display the value of using the following formulas. Create 4 variables, one for each approximated formula.
-
Formula 1: 4 x (1 1/3)
-
Formula 2: 4 x (1 1/3 + 1/5)
-
Formula 3: 4 x (1 1/3 + 1/5 1/7)
-
Formula 4: 4 x (1 1/3 + 1/5 1/7 + 1/9 1/11 + 1/13)
-
Display the value of using each of these formulas.
-
Calculate and display the average value of by finding the average of results from each formula
-
Format all output with 6 digits after the decimal point.
-
Compute the Body Mass Index (BMI)
-
Ask the user to input his/her full name
-
Ask the user to input his/her weight in pounds,
-
the height in feet,
-
and the height in inches,
-
Calculate the BMI
-
Display the users name along with the value of BMI using the format shown in the sample run, below.
-
The simple formula to calculate the BMI is:
BMI = weight in pounds * 703 / (height in inches2 )
If you pick descriptive variable names (a requirement for this course), your programming life would be much easier.
Format all output with 3 digits after the decimal point.
The program should prompt for all necessary input.
The following is a sample run of the code. Your processing must be VERY similar to the sample run.
SAMPLE RUN for question 1
Enter the original price: 100
Enter the markup rate: 20.5
Enter the sale discount rate: 5.8
************ Foos Bookstore Original price = $100
Markup rate = 20.50%
Discount rate = 5.80%
Price after Markup = $120.50
Discount = $6.90
Please Pay: $113.51
SAMPLE RUN for question 2:
The value of PI using formula 1 = 2.666667
The value of PI using formula 2 = 3.466667
The value of PI using formula 3 = 2.895238
The value of PI using formula 4 = 3.283738
The average value of PI = 3.078077
SAMPLE RUN for question 3:
Enter your name: Foo Bar
Enter your weight in pounds = 160
Enter your height in feet = 5
Enter your height in inches = 8
Foo Bar, Your Body Mass Index is: 24.325
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
