Question: Complete the solution by writing code in the addUpChangefunction. Notes: a.If the total value of the coins entered is equal to one dollar, the function

Complete the solution by writing code in the addUpChangefunction. Notes:

a.If the total value of the coins entered is equal to one dollar, the function should return a string that congratulates the user for winning the game.

b.This is the EXACT confirmation text you should use: You win. That is exactly$1.00!

c. Otherwise, the function should return a string indicating whether the amount entered was more than or less than one dollar. Examples of this message appear below. Please follow the pattern of the message exactly. You lose. 0.48 is less than $1.00You lose. 1.23 is more than $1.00d.If the user provides any piece of data that is not numeric, the function should return this EXACT error message: Bad data. Please try again.

Can someone please tell me where I am going wrong with this code and how to fix it? Thank you!

Complete the solution by writing code in the addUpChangefunction. Notes: a.If thetotal value of the coins entered is equal to one dollar, thefunction should return a string that congratulates the user for winning the

index.html workspace (Workspace) ***** a X Cocos o index.html assignment06_moneycountinggame X index.html .../assignment05_03 mis2402workspace > assignment06_moneycountinggame > index.html > html > script > addUpChange 1 2 3 4 index.html workspace (Worksp index.html assignment06_moneycountinggame X index.html .../assignment05_03 mis2402workspace > assignment06_moneycountinggame> index.html > html> script > addUpChange 39 40

41 42 43 115 116 117

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!