Write a program in python to input the value of n and calculate n^2, n^3, n^4?
n=int(input("Input the value of n: "))
print("n^2 :", n*n)
print("n^3 :", n*n*n)
print("n^4 :", n*n*n*n)
Output:-
Input the value of n: 3
n^2 : 9
n^3 : 27
n^4 : 81
MS Word Questions and Answers 1- Which of the following is the valid file extension i…
Copyright @ IT Computer Guruji All Right Reserved
0 Comments