Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Start with the end - design what the user will see when they run your program. Add this sample run as comments in your code.

Start with the end - design what the user will see when they run your program. Add this sample run as comments in your code.
Design first, then write your Python program. The algorithm for finding the number of dollars, quarters, dimes, nickels, and pennies is as follows:
input cents
calculate number of dollars (cents //100)
update remaining cents (cents %100)
calculate number of quarters (cents //25)
update remaining cents (cents %25)
calculate number of dimes (cents //10)
update remaining cents (cents %10)
calculate number of nickles (cents //5)
update remaining cents (cents %5), this is number of pennies left
Requirements:
Have a main() function.
Have a function for every input, process (calculation), and output.
Include a function comment in each function with a description, parameters, and return values. Use """""" to create your comment, take a look at the lab3example.pdf for an example.
Declare result variables in functions. Do not return an equation. Assign the result variable(s) the equation result, the return the result variable(s).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions