Complete the three steps below for at least two distinct examples/scenarios State any necessary input data for your simplified problem • Write clear and specific steps in English (not Python) detailing what the program will do to solve the problem • Describe the specific result of your example/scenario
Added by Michael M.
Step 1
50, quantity 6 - Milk: unit price $2.40, quantity 2 - Bread: unit price $1.80, quantity 1 - Discount percent to apply to the subtotal: 10% (0.10) - Sales tax rate to apply after discount: 7% (0.07) - Output format: final total rounded to two decimal places and Show more…
Show all steps
Your feedback will help us improve your experience
Frank Deng and 86 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
In Exercises 1 and $2,$ complete the sentence. Write the steps of the problem solving plan.
Connections to Algebra
A Problem Solving Plan Using Models
You are asked to conceptualize the solution to a problem without coding it in Python. The problem is as follows: You are provided with a text file containing daily rainfall amounts for a city over a period of time. Each line in the file contains a date with the format mm/dd and a rainfall amount on that day (expressed as a real value >= 0.0, where 0.0 denotes a dry day). The date and rainfall amount are separated by a space, and the text file has at least one entry in it. You may assume that the name of the file is known (i.e. there's no need to prompt the user to input the file name). The problem is to compute the following statistics based on the data in the file: - The number of days it rained - The maximum rainfall amount - The average rainfall amount Sample input file: 11/01 1.23 11/02 0.05 11/03 0.0 11/04 2.91 11/05 0.0 11/06 1.31 1. List all the variables that would be needed to solve this problem. For each variable, provide a name, data type, and a brief description (e.g. input_done is a Boolean used to determine if the user finished inputting values). 2. Are any string operations needed to solve this problem? If so, state which and briefly describe what they achieve. 3. Is either a while or a for-loop needed to solve the problem? If so, identify which kind of loop. What does the loop achieve? What condition needs to be true for the loop to terminate? 4. Is a conditional statement needed to solve the problem? If so, what does it achieve?
Akash M.
Write pseudocode for each example (a) through (e) in Exercise 2, making sure your pseudocode is structured and accomplishes the same tasks as the flowchart segment.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD