Problem 149928 · easy · Phase 01 Prerequisites & Setup

Circumference and Area

functions · geometry · tuples

Write circle_stats(r) that returns a tuple (circumference, area) for a circle of radius r, each rounded to 2 decimal places.

Examples

Input:  r = 1
Output: (6.28, 3.14)

Input:  r = 2.5
Output: (15.71, 19.63)

Input:  r = 0
Output: (0.0, 0.0)

Constraints

  • 0 <= r <= 10**4; r may be an int or a float
  • Use math.pi

Goals

  • Return two values from one function
  • Use `math.pi` and round the results
Starting Python…