Page 1 of 1

Hi! My code isn't working properly and I'm stuck with this problem. Any help is very appreciated. Thanks a lot!

Posted: Fri May 20, 2022 12:27 pm
by answerhappygod
Hi! My code isn't working properly and I'm stuck with this problem. Any help is very appreciated. Thanks a lot!
Hi My Code Isn T Working Properly And I M Stuck With This Problem Any Help Is Very Appreciated Thanks A Lot 1
Hi My Code Isn T Working Properly And I M Stuck With This Problem Any Help Is Very Appreciated Thanks A Lot 1 (108.99 KiB) Viewed 42 times
Description In this problem, you will create a Circle class that stores the radius of the object. You will provide two functions to calculate the area and the perimeter Input This problem do not expect any input Output The output is expected as follows: The circle with radius 1.00 has area 3.14 and perimeter 6.28 The circle with radius 10.00 has area 314.16 and perimeter 62.83 The circle with radius 100.00 has area 31415.93 and perimeter 628.32 Main Program (write the Circle class. The rest of the main program will be provided. In the online judge, the main problem will be automatically executed. You only need the Circle class.) Circle class: In [1]: 1 main program: In [2] : 1 a = Circle() 2 b = Circle(10) 3 C = Circle(100) 4 5 15 = [a,b,c] 6 7 8 for i in 15: 9 print(F'The circle with radius {i.radius:3.2f} has area (i.area():4.2f) and perimeter (i.perimeter():4.2f}') The circle with radius 1.00 has area 3.14 and perimeter 6.28 The circle with radius 10.00 has area 314.16 and perimeter 62.83 The circle with radius 109.00 has area 31415.93 and perimeter 628.32