Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help Creating a flowchart for this in diagrams.new 1. Set the console title: Program Name Your Name 2. Prompt the user to enter

I need help Creating a flowchart for this in diagrams.new

1. Set the console title: "Program Name Your Name"

2. Prompt the user to enter the diameter of a pizza in inches. Pizza diameters can be entered as real numbers. Ensure that the user input is numeric using try except or other means.

3. When the user input is numeric, use a conditional statement to check if the diameter entered is within the range of 8" to 24" inclusive.

4. When the diameter entered is not numeric (i.e. cannot be parsed into a usable numeric value), display an error message indicating the problem.

5. When the diameter entered is numeric but outside of the allowable range, display an error message indicating that the input must be between 8" and 24".

6. Do not allow any processing to continue if the user input is not a valid diameter.

7. When the diameter entered is valid, determine the number of slices to cut the pizza in using an if elif else decision structure based on the following: A diameter of less than 12" cut in 6 slices. A diameter of 12" up to less than 14" cut in 8 slices. A diameter of 14" up to less than 16" cut in 10 slices. A diameter of 16" up to less than 20" cut in 12 slices. A diameter of 20" or over, cut in 16 slices.

8. Calculate the area of the pizza using this formula: = () 2 Hint: Import the math module by typing: import math and then get the value of by typing: math.pi

9. Calculate the area of each slice 10. Display the final result as a formatted string message including the original pizza diameter in inches and the number of slices, to be cut from that pizza as well as the area of the pizza and of each slice as a real number rounded to 2 decimal places. The format should match the example as closely as possible. (bonus marks opportunity if the angle of each slice of the pizza is also displayed more info) 11. Prompt the user to press Enter to end the application and end the application when the user presses Enter.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions

Question

For a given soil, show that sat

Answered: 1 week ago

Question

Are most communication behaviors inborn and entirely natural?

Answered: 1 week ago