In this python if else program, we will check whether the input number is a cube of 3 or not.
Cube: To find the cube of a number, first, multiply that number by itself 3 times
Steps to solve the program
- Take a number as input.
- Using an if-else statement check whether the input number is a cube of 3 i.e. 27.
- Print the respective output.
num = 27
if num == 27:
print("True")
else:
print("False")
Output :
True
Related Articles
Python program to check whether two numbers are equal or not.
Python program to check whether the given input is a complex type or not.
Python program to check whether the given input is Boolean type or not.
Python program to check whether the given input is List or not.
Python program to check whether the given input is a dictionary or not.