For each question, write a program with comments to perform the required tasks

For each question, write a program with comments to perform the required tasks.

1. A car travels 440km in 7 hours. Write a program that calculates the average speed of the

car and displays it in a) km/h rounded to 2 decimal places b) m/sec rounded to the nearest

integer. Display your answers with a suitable message. (13+2=15 points)

2. Cathy needs to make the following purchases: (13+2=15 points)

• Medical supplies costing $45.90

• 2 pairs of shoes. Each pair costing $24.50 before taxes.

• 3 outfits. Each outfit normally costs $65.00 before taxes, but is currently on sale

for 30% off.

a. What is the total cost of her purchases before taxes. Display this value (rounded to

the nearest cent) with a suitable message.

b. There is no tax on medical supplies, but on all other items you must pay a tax of

13%. What is the total cost of her purchases after taxes. Display this value

(Rounded to the nearest cent) with a suitable message.

3. Initialize 3 variables x, y and z with values -7.58, 24 and 6.5678 respectively. Print the

values of x, y and z. Evaluate the arithmetic expression 𝑥𝑥3+𝑦𝑦∗(𝑧𝑧+30)

(𝑦𝑦−𝑥𝑥) −𝑧𝑧 using the values x, y and z defined above, assign the result to a variable and print the result with a suitable message. (18+2=20 points)

Complete Answer:

Get Instant Help in Homework Asap
Get Instant Help in Homework Asap
Calculate your paper price
Pages (550 words)
Approximate price: -
Open chat
1
Hello 👋
Thank you for choosing our assignment help service!
How can I help you?