Question: Problem I: Ocean Levels Goal: Assuming the ocean s level is currently rising at about 1 . 2 millimeters per year, create a program that

Problem I: Ocean Levels
Goal: Assuming the oceans level is currently rising at about 1.2 millimeters per year, create a program that
displays the number of millimeters that the ocean will have risen each year for the next 30 years.
Design: You will be using an IPO diagram to design your program. Under INPUTS, list
everything the program will need to produce the result. Under OUTPUTS, list what the program is going to
produce. Under PROCESSING, list the detailed pseudocode steps needed to produce the programs output.
This includes formulas your program will need.
Output: Your program output should look something like this (the values listed in the Rise column below
may not be real):
Year Rise (in millimeters)
------------------------------------------
11.80
23.60
35.40
47.20
59.00
610.80
712.60
814.40
916.20
1018.00
1119.80
1221.60
1323.40
1425.20
1527.00
1628.80
1730.60
1832.40
1934.20
2036.00
2137.80
2239.60
2341.40
2443.20
2545.00
2646.80
2748.60
2850.40
2952.20
3054.00
Requirements:
Use named constants for all number values that will not be changed in the program
Use F-strings
Problem II: Budgeted vs. Actual Expenses
Goal: Write program that asks the user to enter the amount that he or she has budgeted for a month. Using a while loop, the user should be prompted to enter each of his or her expenses for the month and keep a running total. The loop should finish when the user enters 0. When the loop finishes, the program should display the amount that the user is over budget (if any).
Design: You will be using an IPO diagram to design your program. Under INPUTS, list
everything the program will need to produce the result. Under OUTPUTS, list what the program is going to
produce. Under PROCESSING, list the detailed pseudocode steps needed to produce the programs output.
Input Validation: The amount budgeted for a month must be a positive number; use a while loop to validate the input (see example in section 4.6). An expense must be a non-negative number; use a while loop to validate the input. All decimal values must be rounded to two decimal places.
Output and Sample Dialog:
Enter amount budgeted for the month: 0
Enter a positive amount: -60
Enter a positive amount: -5
Enter a positive amount: 500
Enter an amount spent (0 to quit): -20
Enter a non-negative amount spent: -40
Enter a non-negative amount spent: 50
Enter an amount spent (0 to quit): 75
Enter an amount spent (0 to quit): 800
Enter an amount spent (0 to quit): 23.95
Enter an amount spent(0 to quit): 0
Budgeted: $500.00
Spent: $948.95
You are $448.95 over budget. PLAN BETTER NEXT TIME!
Your program should use F-strings to produce correctly labeled output with dollar amounts rounded to two decimal places and dollar signs.
Requirements:
Use named constants for all number values that will not be changed in the program
Use F-strings

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!