Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Python program (with a main guard) that acts as a very basic circle area calculator. The program will repeatedly ask the user for

image text in transcribed

Write a Python program (with a main guard) that acts as a very basic circle area calculator. The program will repeatedly ask the user for an input radius and will output the area of the circle with that given radius. If the input radius is negative a message is given that the radius must be non-negative (and then ask for another radius). The program ends when the user enters 'quit' (or 'Quit' or 'QUIT' or ...). The program should recognize any case variation for 'quit' to exit the program. For example, your program might look like the following (highlighted is user input): Fancy Circle Area Calculator enter radius : 12 the area of that circle is 452.3893 enter radius : 1.1 the area of that circle is 3.8013 enter radius: -1 the radius must be non-negative enter radius : quit Thanks for using the Fancy Circle Area Calculator For full marks, the displayed area should only show 4 decimal places. You must use an f-string to do this. Note: the area of a circle with radius r is given by a X 72, were a is called pi and is approximately 3.145. Use must use the value of pi provided in the math module for your calculation. Do not hard-code the value yourself in your code

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

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions