Question: basic python programming. No loops, if statements, list. 4.Write a program that reads in the radius and length of a cylinder and computes the area

basic python programming.

No loops, if statements, list.

4.Write a program that reads in the radius and length of a cylinder and computes the area and the volume using the following formulas (use PI = 3.141):

area = radius X radius X

volume = area X length

Here is a sample run

Enter the radius of a cylinder: 5.5

Enter the length of a cylinder: 12

The area is 95.01525

The volume is 1140.183

5.A company has determined that its annual profit is about 24 percent of total sales.

Write a program that asks the user to enter the projected amount of total sales, then displays the profit that will be made from that amount.

(hint: Use the value .24 to represent 24% profit margin)

Formula for profit = projected total sales X profit margin

Here is a sample run

Enter the projected total sales : 1250.00

The profit made from this amount : 300.00

6. A cookie recipe calls for these ingredients 1.5 cups of sugar 1 cup of butter 2.75 cups of flour

The recipe produces 48 cookies with this amount of the ingredients.

Write a program that asks the user how many cookies he or she wants to make, then displays the number of cups of each ingredient needed for the specified number of cookies.

See input/output below.(hint : constants)

Here is a sample run(blue user input):

Enter the number of cookies: 56

To make 56.0 cookies, you will need: #this is the output, run program 4 more times with

1.75 cups of sugar #different number of cookies as test cases

1.17 cups of butter

3.21 cups of flour >>>

8.5.7

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!