Question: Task 01 (10 points) Consider a right triangle. Write a Python script that can take the length of the hypotenuse, c, and one of the

Task 01 (10 points)

Consider a right triangle.

Write a Python script that can take the length of the hypotenuse, c, and one of the included angles, take B for example, and return the other included angle, in this case A, and the length of the two legs, b and a.

Input string

Expected output of script

Enter the length of c: 11

Enter the angle of B: 30

Angle A: 60

Length b: 5.5

Length a: 9.53

Task 02 (10 points)

Write a Python script that can start with a hardcoded list of values separated by commas and return the maximum value, minimum value, average value, median value, and sum.

Hardcoded list

Expected output

numStr = [38,12,43,144,1024,76,1920,1080,255,1440,93,32,64]

Max: 1920

Min: 12

Avg: 478.54

Med: 93

Sum: 6221

Task 03 (20 points)

Write a Python script that will take the given comma separated string of incorrect album names and return a list that contains the values with the correct album names, and in the correct order. The string will always be the same, so you can consider it hardcoded. Remember to only use the things you learned in this section and make sure you correct any errors you find. (hint: look up the output names and order them by release date)

Input string

Expected output of script

The Fall,Humans,Demon Time,The Now Now,Face Value,Vinyl Beach

['Demon Days', 'Plastic Beach', 'The Fall', 'Humanz', 'The Now Now']

Task 04 (30 points)

Consider the following menu from my new restaurant:

Number

Name

Value

1

Double Trouble Cheese Burger

$7.90

2

Carl's Jr. Jalapeo Poppers

$8.82

3

Fried Mayonnaise on a Stick

$14.53

4

Danger Dog (w/ Dangerous Sauce)

$9.96

5

Wings

$25.09

Write a Python script that can read in a customers order by b number and return the total cost of the order as well as the exact change the customer would have to pay for the order.

Input string

Expected output of script

Please enter your order: 1, 4, 4, 2

Order total: 36.64

Dollars: 36

Quarters: 2

Dimes: 1

Nickels: 0

Pennies: 4

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!