You are on page 1of 1

Exercise 2a.

Basic Python

The python file must be saved as Exer2ayourFamilyName and upload it here.


(.ipynb only)

1. Create a python program that will compute the Area of a Circle using the
inputted radius, diameter and circumference. Formulas:
AREA of a CIRCLE

Using Radius: pi * r2

Using diameter: ¼ * pi * d2

Using circumference: c2 / 4*pi

Note: Import pi value from math function.

2. And create a program that will compute and display the Area of a Triangle using
the base and height. Base and Height should be asked from the user.
Formula

AREA of a TRIANGLE = ½ * b * h

3. Write a program that will compute and display the roots of a quadratic equation
using the quadratic formula:

You might also like