1. Using intMath Operations
Area & Volume
Sunil had an assignment on "Areas & Volumes" given by his Mathematics Teacher. He was given 1.'Side', from which he have to find
- Area of Square &
- Volume of Cube
2.'Radius', From which he have to find
-Area of Circle &
-Volume of Sphere
3."pi" equals to 3.14
Write the function definition for the function "Integer_Math" which takes two arguments 'Side' and 'Radius'
Print the Areas and Volumes as per the Sample Test Case below.
Input Format for Custom Testing:
#In the first line, value for 'Side'
#In the second line, value for 'Radius'
Note:
-The outputs must be rounded off to two decimal places
-Use round() for rounding off
-Example: round(123.45555,2) is 123.46
Sample Test Case 1:
Sample Input
STDIN Function parameter ----- ------------------ 5 → Side 7 → RadiusSample Output
Area of Square is 25
Volume of Cube is 125
Area of Circle is 153.86
Volume of Sphere is 1436.03
Answer:
No comments:
Post a Comment
If you have any doubts, Please let us know.