Question: Lab 2 T: Challenge - McChange Back CIS - 2 1 6 - Python Programming - 2 2 6 5 4 TR 0 3 :
Lab T: Challenge McChange
Back
CISPython Programming TR :pm
# 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 changeinpennies is an int
#
UNCOMMENT AND ENTER CODE BELOW
#changeinpennies
# actual calculations of output
# THE ALGORITHM:
# st divide changeinpennies by : quotient is num of s
# remainder is leftover still to be worked on
# nd divide leftover amount by : quotient is num of 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 changeinpennies
#leftover changeinpennies
#tens leftover
print
print fCustomer owes: $owes:f
print fCustomer paid: $paid:f
print "Change is: $ change:f
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
