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 18:30
Kto rozmawia z clamentain przez krótkofalówke w the walking dead w 4 epizodzie
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
Word vocabulary words: print, proofread, status line, graphics, font effects, left margin, justification, line spacing, copy/paste, data. review words: font point, bold, save, center, error. fill in the correct word for the definition and then transfer the letters to the appropriate spot by number. some numbers will be found multiple times. you will end up with a quotation about…… what else? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 k 16 17 18 19 20 21 22 23 24 25 8 27 28 29 w 31 32 k 34 35 36 w h 39 40 41 42 8 44 45 46 47 48 49 50 51 52 53 54 55 .1. a software function that records keystrokes on a disk or drive so information can be 5 4 52 9 later retrieved. p n 2. to produce a paper copy of information. 10 7 12u n 3. a display that shows the location of the cursor, pages, etc. 45 46 18 27 36 20 42p4. pictures or images, located in clip art or other files. 6 24 44 28 34 49 555. any mis-stroke of a key. 47 41 48 2 10 n6. allows major changes to the font such as shadow, emboss, etc. 21 25 46 35 23 21 29 14 22 17 n7. a feature that centers lines of text horizontally. 49 53 46 9 51 p8. size of the font 31 16 22 b l 9. a feature that prints designated text darker than the rest to add emphasis. 32 3 . p10. to compare copy on a display screen or printout to the original 24 39 25 23 54 9 50 3 and correct errors. j un 11. a feature that allows text to be aligned at the left 11 12 7 21 16 49 40 46 34 2 and right margins. leftn 12. amount of blank space on the left side of the paper. 8 18 41 6 34 linen 13. number of blank lines between lines of text. 17 4 49 13 1914. any information inputted into the computer. 3 4 46 44 p /p15. feature that duplicates text from one location and places it in another.
Answers: 2
question
Computers and Technology, 24.06.2019 13:00
In a heat transfer course, we can derive the equation for the temperature distribution in a flat rectangular plate. in this example, we will look at a plate at steadystate with three sides being held at t1, and one side held at t2. the temperature for any location on the plate, t(x,y), can be calculated by where create a function (prob3_5) that will take inputs of vectors x and y in feet, scalar n, scalars l and w in feet and scalars t1 and t2 in degrees fahrenheit. it will output a matrix t which is the temperature of each x and y locations. t will have the number of columns equal to the number of elements in x and rows equal to the number of elements in y. though this can be done without loops (perhaps more efficiently), your program must use a nested loop.
Answers: 2
question
Computers and Technology, 24.06.2019 16:50
7.23 main lab 7 - online shopping cart background this main lab extends the earlier prep lab "online shopping cart part 1". (you should save this as a separate project from the earlier prep lab). you will create an on-line shopping cart like you might use for your on-line purchases. the goal is to become comfortable with setting up classes and using objects. requirements this lab can be done individually or as pair programming. expanded itemtopurchase class (15 points) extend the itemtopurchase class as follows. we will not do unit testing in this lab so we will not be giving you the names of the member functions. create good ones on your own. create a parameterized constructor to assign item name, item description, item price, and item quantity (default values of "none" for name and description, and 0 for price and quantity). additional public member functions set an item description get an item description print the cost of an item - outputs the item name followed by the quantity, price, and subtotal (see example) print the description of an item - outputs the item name and description (see example) additional private data members a string for the description of the item. example output of the function which prints the cost of an item: bottled water 10 @ $1.50 = $15.00 example output of the function which prints the item description:
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, 23.03.2020 23:23
question
Mathematics, 23.03.2020 23:23
question
Social Studies, 23.03.2020 23:23
question
Mathematics, 23.03.2020 23:23
Questions on the website: 13722367