xxxxxxxxxx
#Finding cube roots
def cube_root(Cube_Number):
Possibe_Number_To_Use = 2
Factors = []
while True:
Factor = Cube_Number / Possibe_Number_To_Use
if str(Factor).endswith(".0") :
Cube_Number = Factor
Factors.append(Possibe_Number_To_Use)
if Factor == 1:
break
else:
Possibe_Number_To_Use += 1
return Factors
print(cube_root(9))
xxxxxxxxxx
# Check if the Square root of the First number is Equal to the Cube root of the Second number
import math
global x
global y
def check_square_and_cube(x, y):
sq_rt_x=math.sqrt(x)
cb_rt_y=(y**(1/3))
if sq_rt_x==cb_rt_y:
return True
else :
return False
check_square_and_cube(9, 27)