1. Create a program using a function to determine the distance between two points (x1, y1)
and (x2, y2) with :
distance = abs(x1-x2) + abs(y1-y2)
Position x1, y1, x2, y2 based on input data.
Example output:
The distance between A(3, 8) and B(7, 2) is 10
2. Write a program to create an options Menu and perform area calculations for two shapes
(rectangle, circle).
Make some functions: menu, calculate the area of a rectangle, calculate the area of a
circle. The output of the program is as follows:
,
and (x2, y2) with :
distance = abs(x1-x2) + abs(y1-y2)
Position x1, y1, x2, y2 based on input data.
Example output:
The distance between A(3, 8) and B(7, 2) is 10
2. Write a program to create an options Menu and perform area calculations for two shapes
(rectangle, circle).
Make some functions: menu, calculate the area of a rectangle, calculate the area of a
circle. The output of the program is as follows:
,