About initial python programming: Write a program that reads a code i, in a range of 1 to 4, and 3 positive integer a, b, c values, with a < b. If code i = 1 then calculate the area of the trapezoid of bases a and b and height c and display it along with the read values. If code i = 2 then calculate a · a, b · b and c · c, showing along with the read values. If code i = 3 then calculate the arithmetic mean between a, b and c, and display it together with the read values. If code i = 4 then calculate and show the sum of integers from a (inclusive) to b (inclusive) with a variation equal to c (if a = 5, b = 19 and c = 3, then sum = 5 + 8 + 11 + 14 + 17 = 55).
About initial python
Write a program that reads a code i, in a range of 1 to 4, and 3 positive integer a, b, c values, with a < b.
If code i = 1 then calculate the area of the trapezoid of bases a and b and height c and display it along with the read values.
If code i = 2 then calculate a · a, b · b and c · c, showing along with the read values.
If code i = 3 then calculate the arithmetic mean between a, b and c, and display it together with the read values.
If code i = 4 then calculate and show the sum of integers from a (inclusive) to b (inclusive) with a variation equal to c (if a = 5, b = 19 and c = 3, then sum = 5 + 8 + 11 + 14 + 17 = 55).
IMPORTANT: Each of the features described above must be implemented in one (or more) functions.
Step by step
Solved in 2 steps