Q. Write a program to read a number n and print n^2 , n^3 and n^4.


You can understand by Watching video :-



Answer :-

n = int(input("Enter a Number = "))
print(n**2,n**3,n**4)

Output :-

Enter a Number = 10
100 1000 10000

>>> 

Enter a Number = 2
4 8 16

>>> 

Enter a Number = 56
3136 175616 9834496

>>>

4 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post