Sale!

Solved Python Exercise 1 Runway Length (15 points)

$30.00 $21.00

Original Work ?

Download Details:

  • Name: Assignment-1-doqisj.zip
  • Type: zip
  • Size: 106.55 KB

Category: Tags: , You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (1 vote)

Runway Length (15 points)
Given an airplane’s acceleration, a, and take-off speed, v, the minimum runway length needed
for the airplane to take off is computed using the formula !!
“# .
Write a program that prompts the user to enter the speed in meters per second (m/s) and the
acceleration in meters per second squared (m/s2
). The program should calculate and display the
minimum runway length. Format the result to four decimal places.
Sample output:
Enter the plane’s take off speed in m/s: 60
Enter the plane’s acceleration in m/s**2: 3.5
The minimum runway length needed for this airplane is 514.2857 meters.
______________________________________________________________________________
Area of composite shape (15 points)
Write a program that finds the area of the shaded region in the shape below:
q
The area of a kite is given as $%
” where p and q represent the lengths of the diagonal parts of the
kite. The area of a circle is given as A = pr2 where r is the radius of the circle.
Prompt the user for the lengths of p, q and r. The program should output the area of the
shaded region only. Use the defined constant for p (in the math module). Format the result to 3
decimal places.
A sample of the output is shown below:
Enter the first diagonal length: 20
Enter the second diagonal length: 15
Enter the radius of the enclosed circle: 5
The shaded area is 71.460 square units.
______________________________________________________________________________
Ingredient Adjuster (15 points)
A cookie recipe calls for the following ingredients:
• 1.5 cups of sugar
• 1 cup of butter
• 2.75 cups of flour
The recipe produces 48 cookies with this amount of ingredients. Write a program that asks the
user how many cookies they want to bake. The program should calculate and display the
adjusted amount of each ingredient for the specified number of cookies. Create ‘constants’ to
store the ingredients and the ‘default’ number of cookies in your script.
A sample of the output is shown below:
Enter the number of cookies: 30
To make 30.0 cookies, you will need:
0.94 cups of sugar
0.62 cups of butter
1.72 cups of flour
______________________________________________________________________________
Tip Calculator (15 points)
Write a program that reads the subtotal and gratuity rate. The program then calculates and
gratuity as a dollar amount, followed by the total amount, and displays all information in
dollars.
Your code should include currency formatting (i.e., use the $ in your output, include comma
separation and format the result to 2 decimal places.)
Sample output:
Enter the subtotal: $1250
Enter tip amount (as a %): 25
Subtotal: $ 1,250.00
Tip: $ 312.50
Total: $ 1,562.50