Question: Objective: Use basic Python statements for Input, Processing, and Output. Assignment: Write a Python program consisting of several parts. Even though these segments are not

Objective:

Use basic Python statements for Input, Processing, and Output.

Assignment:

Write a Python program consisting of several parts. Even though these segments are not related, you will write code for each part, one after the other. DO NOT create multiple files for each part.

Note: Helpful formulas are listed below:

Program Steps:

Ask the user for a temperature reading in degrees Celsius and convert it to degrees Kelvin. Display the degrees, Kelvin.

Ask the user for a temperature reading in degrees Fahrenheit and convert it to degrees Kelvin. Display the degrees, Kelvin.

Ask the user for the radius of a circle and calculate and display its area and perimeter.

Ask the user for the radius and height of a cylinder and calculate its area.

Ask the user for the number of regular hours worked, overtime hours worked, hourly pay rate, income tax percentage, and parking fee. Overtime pay is 2 times the hourly pay rate. Calculate and display the gross pay and net pay.

Ask the user to input the weight of a person in pounds, the height in feet and inches, and calculate the Body Mass Index (BMI).

Discussion and Formulas:

Make sure to keep order of operation in mind.

Kelvin = (9/5 * Celsius + 491.67) * 5/9 Kelvin = (Fahrenheit + 459.67) * 5/9 Area of circle = 3.1415 * radius * radius Perimeter of circle = 2 * 3.1415 * radius Area of cylinder = 2 * 3.1415 * radius * height + 2 * 3.1415 * radius * radius Gross Pay = (regularHours * hourlyRate) + overtimeHours * hourlayRate * 2 Net Pay = Gross Pay  (Gross pay * taxPercent / 100)  parkingFee BMI = weight in pounds * 703 / (height in inches * height in inches) 

Program Example:

You must include code documentation. Your program must contain in-code comments and a comment header block at the beginning of the program with the information shown in the example below. You must keep your comment and code lines within 80 columns so you can cut and paste the ruler below into your code as a guide.

In Python, comment lines start with the # symbol. Make sure to include comments throughout your code explaining the key steps of the program. You can put these comments in a separate line above the code you are explaining or at the end of the code line if there is room.

#0123456789|123456789|123456789|123456789|123456789|123456789|123456789|1234567899 # Name: # Course: # Date of completion: # Time to complete: # Program description: This program calculates the area of a rectangle based on # inputs for length and width from the user. # ********* Part 1 Calculate area of a rectangle ************ # Input width width = float(input("Please enter a value for the width in Meters: ")) # Input length length = float(input("Please enter a value for the length in Meters: ")) area = width * length # Calculate the area # Display the results print("The area of the square is", format(area, '.2f'),"Square Meters") # End Program 

Special Program Requirements:

Your processing must be very similar to the sample run below (Note the *** before the output values) and you should test your code to the sample run as a minimum.

Do not use any advanced functions including selection structures, repetition structures, lists or functions.

Grading: The grading will be based on the current assignment Rubric.

Sample Run:

Format all decimal number output to 2 digits after the decimal point.

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!