Exercise 1: Compute Formula Using cmath
In this exercise you need to compute the sqrt(a^2+b^2) formula
We'll cover the following
Problem Statement
Write a code in which you:
- First, compute Squares of two Floating point variables
a
andb
. - Then Add them after taking squares.
- Now take Square Root of the answer.
- Use
cmath
library to compute the solution.
Below is an illustration showing the formula you need to compute:
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy