Q.No.5 - Program to display the square and cube of poistive and negative number.
Sol.- Explaination of this code is given below:
num = int(input(" Enter No. "))
if(num>0):
print("Square of No. ", num**2)
print("Cube of No. ", num**3)
elif(num<0):
print("Square of No. ", num**2)
print("Cube of No.", num**3)
else:
print("No. is Zero.")