def get_change(cash_received: float, to_pay: float) -> float: ' ' ' Calculates total change to return to user. Total change must be multiples of Australian currency (banknote and coins) Values for banknotes: $5, $10, $20, $50, $100 Values for cents: 5 cents, 10 cents, 20 cents, 50 cents, $1, $2 Note: Krusty is greedy and doesn't want to lose money giving change. The function should not return more change than the customer is owed. Parameters cash_received: float, amount of cash received from user to_pay: float, amount owed for purchases Returns total_change: float, amount to return to user (Australian currency) >>> print(get_change(30.0, 26.52)) 3.45

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter12: Exception Handling
Section: Chapter Questions
Problem 11PE
icon
Related questions
Question

can i get help with this question please

def get_change(cash_received: float, to_pay: float) -> float:

' ' '

Calculates total change to return to user. Total change must be multiples of Australian currency (banknote and coins)

Values for banknotes: $5, $10, $20, $50, $100

Values for cents: 5 cents, 10 cents, 20 cents, 50 cents, $1, $2

Note: Krusty is greedy and doesn't want to lose money giving change.

The function should not return more change than the customer is owed.

Parameters

cash_received: float, amount of cash received from user

to_pay: float, amount owed for purchases

Returns

total_change: float, amount to return to user (Australian currency)

>>> print(get_change(30.0, 26.52))

3.45

' ' ' 

pass

Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning