Exercise On Numbers

 Question

1) Create a program to calculate the area and circumference of a circle. Ask the user for the radius.

Formulas needed

Area  =  π x r2

circumference =  2 x π x r

where r = radius, and pi = 3.14

Good luck when you're done come back here to see the solution.


Solution

code:










output:







So our program is working, good luck out there. We would later look at how to create a calculator.

No comments:

Post a Comment

Python Programming Tutorial 15

 Error Handling Anytime we work with user input, we should make sure not only the data is valid and within the range we want, like what we d...