You own a restaurant. In your restaurant, you sell the following:
Hamburger $3 each
Hot Dog $2 each
Milk Shake $3 each
Start by writinga function with a name like ‘calculateBill’ that will do the following:
- Allow the caller to pass in three parameters:
the number of hamburgers to buy
the number of hot dogs to buy
the number of milk shakes to buy
- Calculate the subtotalof this purchase, by doing some simple math.
- Add 10% of that amount for tax, to get a total
- it shouldreturnthe totalamount for the purchase
- The calculateBill function should NOT print anything, onlythe main code should do the printing.
Then write 3 calls to the function:
The first two calls should use different amounts of hamburgers, hot dogs, and milk shakes. To verify that your function works correctly, test with these values:
3 hamburgers, 2 hot dogs, and 1 milk shake.
This order shouldcome out to(16.00 plus 1.60 tax) 17.60.
8 hamburgers, 8 hot dogs, and 8 milkshakes
This order should give a cost70.40
To prepare for the third call, you need to add some interactivity. Ask the user three questions to get the number of hamburgers, hot dogs, and milk shakes they wantto order (reminder: to get input from the user, use the input built-in function). Then the third call tothe calculateBIll function shoulduse the numbers you got from the user.
After each call to the function, add a line to print out the resulting bill, for example:
Your bill is: $123.45
Do NOT worry about the number of decimal places shown. For example, in the first example above with 3 hamburgers, 2 hot dogs, and 1milkshake, the total will probablyprint as 17.6 - that is OK.
Turn in your Python source file as: YourName_Homework2.py