Question: Write a Python program to perform the following tasks: 1. Prompt the user to enter the total revenue for a company for some year. 2.

Write a Python program to perform the following tasks:

1. Prompt the user to enter the total revenue for a company for some year.

2. Accept the total revenue for the company. This could be a number with a decimal point in it.

3. Prompt the user to enter the profit for the company for the year.

4. All prompts must be as in the sample interaction below.

5. Accept the total profit for the company. This could be a number with a decimal point in it.

6. Compute the profit percentage.

7. Display the revenue, profit, and the profit as a percentage of the revenue with annotations as in the sample interaction below.

8. The percentage must be formatted in the output to 2 places after the decimal point.

9. Display the revenue and the profit graphically using turtle graphics in Python.

The heights of the rectangles for revenue and profit must be proportional to the values input by the user. The width of these rectangles should be 20 pixels. The turtle must not be shown on the screen and the display must appear instantaneously. Write Python code that solves the problem.

Make sure that it prompts for the input , computes the profit, and displays the result as specified. Debug your code as necessary until it complies with all requirements. The Python code must prompt for user input and annotate the results as given in the sample interactions below. Both the text values for the prompts and annotations and the order are important and must be adhered to.

This program reads in the annual revenue and profit for a company and echoes the input and displays the profit as a percentage of the annual sales. It then displays the revenue and the profit graphically.

Enter total sales: 2000000

Enter profit: 180000

Sales 2000000.0 Profit 180000.0 Profit Percentage 9.00%

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!