2 of 3
Paper No: 1
a and b are not zero). You should write statements to check if they have the same sign then print out result of a² + b², otherwise print out result of a*b
Notes:
- Do not edit given statements in the main function.
- You can create new functions if you see it is necessary.
- The output value is formatted in two decimal places
Sample input and output:
-Input:a= -3.5b= -4.5
After processing: result = 32.50
Output for marking:OUTPUT:32.50
-Input:a = -3.5b = 4.5
After processing: result = -15.75
Output for marking:
+ 100%
Zoom
Close