Give change
Subtract the price from the amount paid to find the change.
Simple example
Start5 − 2
Result3
def main():
print((5 - 2))
3
Advertisements
Everyday examples
A customer pays 20 for a meal costing 13. How much change should they get?
Start20 − 13
Result7
def main():
var paid = 20
var price = 13
print((paid - price))
7