Preview:
num = int(input("enter number:"))

print("square of",num,'is',num*num) # normal

print('square of',num,'is',pow(num,2)) # using pow() function

print('square of',num,'is',num**2) # using exponent operator

print("cube of",num,'is',num*num*num) # normal

print('cube of',num,'is',pow(num,2)*num) # using pow() function

print('cube of',num,'is',num**2*num) # using exponent operator
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter