Question: Write a program, ch 2 _ p 1 . py , that gets a float from the user using the input ( ) function representing

Write a program, ch2_p1.py, that gets a float from the user using the input() function
representing the total of a restaurant bill. Then, calculate a 18%,20%, and 25% tip on the bill as well
as the total amount for each including the tip. Format your output as shown below, including rounding
all floating-point numbers to 2 decimal places and a tab between the tip amount and word Total.
You are trying to make Lemon Drop cocktails, but the recipe is written in ounces and you do not own
a jigger (a cocktail measuring cup that measures in ounces). Write a program, ch2_p2.py, that
converts the recipe from ounces to tablespoons. There are 2 tablespoons in 1 ounce. Then, using the
input() function, ask the user how many cocktails they want to make and adjust the tablespoons
version of the recipe. Finally, print out the adjusted recipe to the user (in tablespoons) for their desired
number of cocktails. Utilize constants to store the ounce amounts of each ingredient as floats.
Write a program, ch2_p3.py, that gets two integers from the user using the input()
function and performs the modulo operation on the two integers without using the mod
operator (%). Use only other math operators (addition, subtraction, division, integer division,
and/or exponent) to calculate the result of the mod operator with the users chosen integers.
Print both your calculation and the calculation using the mod operator for comparison.
SUBMISSION
PROGRAM 2
PROGRAM 3
PROGRAM 1
Submit your ch2_p1.py, ch2_p2.py, and ch2_p3.py files to the
Chapter 2 Homework Programs: Input, Processing, and Output assignment on Canvas.
Enter bill total: $63.85
18%: (Tip $11.49 Total: $75.34)
20%: (Tip $12.77 Total: $76.62)
25%: (Tip $15.96 Total: $79.81)
How many Lemon Drops to make: 2
To make 2 Lemon Drop(s), mix:
*8.0 tbs of vodka
*2.0 tbs of triple sec
*4.0 tbs of lemon juice
*4.0 tbs of simple syrup
Enter first integer: 10
Enter second integer: 3
My Calculation: 10%3=1
Mod Operator Calculation: 10%3=1
EXAMPLE OUTPUT
EXAMPLE OUTPUT
EXAMPLE OUTPUT
ENTER
ENTER
ENTER
ENTER
LEMON DROP RECIPE:
2 ounces of vodka
1/2 ounce of triple sec
1 ounce of lemon juice
1 ounce of simple syrup
Dont worry about negative
values. Assume the user will only
enter positive whole numbers

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!