EXERCISE 5
Create an array of type float called Square that has 3 rows and 2 columns.
(a)
For each Square, get the measurements.
(b)
Send the array Square to function calculate(...).
(c)
In function calculate(...) calculate and display the area for each square.
(d)
Measurement for Square 1
Enter measurement 1: 2
Enter measurement 2: 3
Measurement for Square 2
Enter measurement 1: 4
Enter measurement 2: 5
Measurement for Square 3
Enter measurement 1: 6
Enter measurement 2: 7
: 2.00
Measurement 1
: 3.00
Measurement 2
: 6.00
Area for Square 1
: 4.00
Measurement 1
: 5.00
Measurement 2
: 20.00
Area for Square 2
: 6.00
Measurement 1
: 7.00
Measurement 2
: 42.00
Area for Square 3
Press any key to continue
Here is the Python code to solve the exercise:
Not the question you are looking for? Ask here!
Enter question by text
Enter question by image
Unlock Smarter Learning with AskSia Super!
Join Super, our all-in-one AI solution that can greatly improve your learning efficiency.