Question: Lab 2 T: Challenge - McChange Back CIS - 2 1 6 - Python Programming - 2 2 6 5 4 TR 0 3 :

Lab 2T: Challenge - McChange
Back
CIS-216-Python Programming-22654 TR 03:00pm
# Calculate how much change is due
change = paid - owes , # float data type
# NOTE: It's easier to do the calculations working with pennies,
# First change from dollars to pennies.
# Make sure that change_in_pennies is an int
#
'' UNCOMMENT AND ENTER CODE BELOW ''"
#change_in_pennies =???
# - actual calculations of output
# THE ALGORITHM:
# 1st) divide change_in_pennies by 2000 : quotient is num of 20's
# remainder is leftover still to be worked on
# 2nd) divide leftover amount by 1000: quotient is num of 10's
# remainder is leftover still to be worked on
# etc.
# You are to complete the calculation section of code below
# ONLY modulus and integer division may be used to solve this problem
# This take many coding statements using temp variable
# DO NOT shove all calculations together
' :' UNCOMMENT AND ENTER CODE BELOW '?''
#twenties = change_in_pennies ???
#leftover = change_in_pennies ???
#tens = leftover ???
print(+++++++++++++++++++++++")
print (f"Customer owes: ${owes:5.2f}")
print (f"Customer paid: ${paid:5.2f}")
print (f "Change is: ,$ change:5.2f
 Lab 2T: Challenge - McChange Back CIS-216-Python Programming-22654 TR 03:00pm #

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!