← Back

Function Challenge 1 - Area of a Circle


Introduction

This function calculates the area of a circle.

The area of a circle is calculated using the formula:

Circle Area Formula

The function may be tested with a program that prompts the user to enter the radius of a circle.

Challenge Tasks

  1. Create a console project named FunctionChallenge1CircleArea.
  2. Implement a function with the given signature:

C#

double GetCircleArea(double radius)

Python

def get_circle_area(radius)