Computers and Technology
Computers and Technology, 20.06.2020 22:57, cherbears

Imagine a gas station that offers a rewards card program. When a customer buys gas, he or she is rewarded with used to purchase other goods. Write a function gas. reward) that takes the following arguments, in this order 1. currentpoints: the current rewards points (an integer) on the customer's gas rewards card 2. gas. type: the type of gasoline purchased (a string), which is one of the following Regular: $2.65/ gallon Plus':$2.90/ gallon . 'Premium $3.10/ gallon 3. money_spent: the amount of dollars spent on gas for a particular transaction. This number is needed to As previously mentioned, after each gas refill, the customer gets a certain amount of rewards points. The function 1. Normally, 5 points are rewarded for everyfull dollar spent. For example, $6.83 spent will result in 5x6=30 compute how many gallons of gas were purchased. calculates and returns the updated, new total rewards points of the customer. The rewards rules are as follows: new reward points. Hint: given a floating-point variable x, the code int (x) will truncate x, thereby giving only the integer part of x: integer part- int (x) 2 If at least 10 gallons of gas were purchased, the customer will be rewarded 200 reward points 3. If at least 15 gallons of gas were purchased, the customer will be rewarded 400 reward points 4. If at least 20 gallons of gas were purchased, the customer will be rewarded 550 reward points Note: Only one of the above rules can be applied per transaction. For example, if a customer bought 16 gallons of gas, he/she will get 400 and only 400 reward points. Rule is applied for purchases of less than 10 gallons Special Cases: Below are some special cases that the function must handle. Your code should check for these special cases in this order

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 00:10, MadiAbbott798
How does access indicates that a filter has been applied to a specific column
Answers: 1
image
Computers and Technology, 22.06.2019 05:00, 420420blazee
Are special characters that allow you to search for multiple words at the same time.
Answers: 2
image
Computers and Technology, 24.06.2019 16:50, Ameilasmickle15
How many types of string types does python support?
Answers: 1
image
Computers and Technology, 25.06.2019 10:00, dulce129
Aline ab is in 1st quadrant , its ends a and b respectively are 20mm and 60mm infront of vp respectively . the distance between the end projectors is 75 mm . the line is inclined at 30 degrees to the hp and end a 20 degrees above the hp . draw its projections , find true length
Answers: 2
Do you know the correct answer?
Imagine a gas station that offers a rewards card program. When a customer buys gas, he or she is rew...

Questions in other subjects:

Konu
World Languages, 18.09.2019 02:30
Konu
Computers and Technology, 18.09.2019 02:30