Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Coconut Programming Problem and Solution – Circle


Problem: Write a program that accepts Radius of a circle and find its diameter, circumference, and area.

Solution:


PI = 3.14
dia = 0.0
area = 0.0
cir = 0.0

radius = input("Enter value of radius: ")
radius = float(radius)

dia = radius * radius
area = PI * dia
cir = 2 * PI * radius

"Diameter of the circle is " + str(dia) |> print
"Area of the circle is " + str(area) |> print
"Circumference of the circle is " + str(cir) |> print

Video:

The code is posted here: http://more-codes.com/problems.php

Github Link: problem4.coco

Github Repository: Easy Problems

For more Coconut Programming Problems and Solutions, please visit us at more-codes.com

Facebook: Like Us!
Twitter: Follow Us!
Thank you very much.


The post Coconut Programming Problem and Solution – Circle appeared first on MoreCodes.

Share the post

Coconut Programming Problem and Solution – Circle

×

Subscribe to Morecodes | Learn Programming Problems And Solutions In C,c++, Java, D, Vb.net, C#, F#, Ruby, Python

Get updates delivered right to your inbox!

Thank you for your subscription

×