+ 1
How we can do a program of x raise to n ??
3 ответов
+ 9
You can simply use ** operator to raise x to power of n, (x**n), alternatively you can use pow() function https://www.google.com/amp/s/www.geeksforgeeks.org/pow-in-JUMP_LINK__&&__python__&&__JUMP_LINK/amp/
+ 5
Using Power Operator (**), like this if
x = 2
x ** 2 = 4
In JavaScript we also call it Exponentiation operator introduced in ES 2016