subject

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

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
How does a policy manual an organization? a. it boost productivity. b. it create awareness in employees about the organization’s values. c. it employees achieve targets. d. it safeguards the organization from liabilities.
Answers: 1
question
Computers and Technology, 22.06.2019 15:00
Hyperactive media sales has 10 windows 7 laptop computers used by sales-people in the organization. each laptop computer has several customized applications that are used during the sales process as well as customer relationship management software. all of the applications on the laptops are difficult to configure and have large data files. if all of the laptops have current hardware, what is the easiest way to install windows 10 on them?
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Jennifer has to set up a network in a factory with an environment that has a lot of electrical interference. which cable would she prefer to use? jennifer would prefer to use because its metal sheath reduces interference.
Answers: 1
question
Computers and Technology, 24.06.2019 03:00
Click the "draw structure" button to activate the drawing utility. draw two diastereomers of (1z,4r)−1,4−dimethylcyclodecene and name them, including (e)/(z) and (r)/(s) notation. part 1 out of 4 draw the diastereomer containing a chiral center with s configuration here. window open
Answers: 1
You know the right answer?
Imagine a gas station that offers a rewards card program. When a customer buys gas, he or she is rew...
Questions
question
Mathematics, 25.02.2021 17:40
question
Mathematics, 25.02.2021 17:40
question
Physics, 25.02.2021 17:40
Questions on the website: 13722367