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

  1. 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

    1. Ask the user for the required input (original price, mark up rate, and discount rate).

    2. Display a header as shown in the sample interaction, below.

    3. Display the values of each of the items you asked from the user (see the sample interaction).

    4. 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.

  1. 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.

    1. Formula 1: 4 x (1 1/3)

    2. Formula 2: 4 x (1 1/3 + 1/5)

    3. Formula 3: 4 x (1 1/3 + 1/5 1/7)

    4. Formula 4: 4 x (1 1/3 + 1/5 1/7 + 1/9 1/11 + 1/13)

    5. Display the value of using each of these formulas.

    6. 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.

  1. Compute the Body Mass Index (BMI)

    1. Ask the user to input his/her full name

    2. Ask the user to input his/her weight in pounds,

    3. the height in feet,

    4. and the height in inches,

    5. Calculate the BMI

    6. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!