id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

bryce.hulett@hotmail.com > area
prev  |  next  |  chance

Given the radius, calculate and return the area of a circle rounded to 2 decimal places. The formula is A = πr^2. Approximate pi with the value 22.0/7.0 (22/7 would work in a Python environment).


area(10) → 314.29
area(1) → 3.14
area(3) → 28.29

...Save, Compile, Run (ctrl-enter)

def area(radius):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 200 Post-solution available

Copyright Nick Parlante 2017 - privacy