Question: 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
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 2, were 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
Get step-by-step solutions from verified subject matter experts
