Answered step by step
Verified Expert Solution
Question
1 Approved Answer
use python 1 original_total = 5.45 2 donation = 0.55 3 4 #You may modify the lines of code above, but don't move them! 5
use python
1 original_total = "5.45" 2 donation = "0.55" 3 4 #You may modify the lines of code above, but don't move them! 5 #when you submit your code, we'll change these lines to 6 #assign different values to the variables. 7 8 #Imagine you're writing code for the cash register of a 9 #fast casual restaurant. For this restaurant, customers have 10 #the option to round up their total and donate the extra to 11 #charity. For example, if a customer's total was $5.45, they 12 #could round up to $6.00, and donate the extra $0.55 to 13 #charity. 14 # 15 #The variables original_total and donation represent these 16 #values; you may assume they will always add to a whole integer. 17 #Due to an error by another programmer, though, they are initially 18 #given to you as strings rather than floats. 20 #write some code that will print the customer's total and 21 #how much they donated. This sentence should read as follows: 23 # Your total is $6 and you donated $0.55 24 25 Note that because we always round up to a full dollar, 26 #the total should be printed as an integer. Make sure the 27 #dollar signs are in the right place, with no spaces following 28 the dollar signs. 29 3e 31 Add your code here! 32 33 19# 22 DNM Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started