7 kyu

Some Circles

747 of 1,418otajor

Description:

Write a function that takes as its parameters one or more numbers which are the diameters of circles.

The function should return the total area of all the circles, rounded to the nearest integer in a string that says "We have this much circle: xyz".

You don't know how many circles you will be given, but you can assume it will be at least one.

So:

sumCircles(2) == "We have this much circle: 3"
sumCircles(2, 3, 4) == "We have this much circle: 23"
sum_circles(2) == "We have this much circle: 3"
sum_circles(2, 3, 4) == "We have this much circle: 23"
sum_circles(2) == "We have this much circle: 3"
sum_circles(2, 3, 4) == "We have this much circle: 23"

Translations and comments (and upvotes!) welcome!

Fundamentals
Geometry
Algebra

More By Author:

Check out these other kata created by otajor

Stats:

CreatedOct 6, 2015
PublishedOct 6, 2015
Warriors Trained2317
Total Skips114
Total Code Submissions5858
Total Times Completed1418
JavaScript Completions583
Python Completions747
Ruby Completions147
Total Stars25
% of votes with a positive feedback rating81% of 233
Total "Very Satisfied" Votes169
Total "Somewhat Satisfied" Votes41
Total "Not Satisfied" Votes23
Ad
Contributors
  • otajor Avatar
  • GiacomoSorbi Avatar
  • CrazyMerlyn Avatar
  • NaMe613 Avatar
  • FArekkusu Avatar
  • hobovsky Avatar
  • cliffstamp Avatar
  • Just4FunCoder Avatar
  • saudiGuy Avatar
Ad