+ 12

What is the meaning of pow()?

pow(27,1/3)

6th Sep 2019, 1:02 PM
Debbie
Debbie - avatar
7 ответов
+ 11
The pow() method returns x to the power of y, where x(is the base) and y(is the exponent) should be non-negative integers. The pow() method simply means x**y Taking the given example, pow(27,1/3) : The result will be 3.0 as you are multiplying the base 27, one third times (or simply calculates the cube root).
6th Sep 2019, 1:17 PM
Nova
Nova - avatar
+ 6
You need to import math to use pow().
23rd Oct 2019, 9:52 PM
Sonic
Sonic - avatar
+ 4
power_function = pow(num, power)
6th Sep 2019, 3:51 PM
Raihan Arefin🇧🇩 [Thunder_Rabbit⚡⚡]
Raihan Arefin🇧🇩  [Thunder_Rabbit⚡⚡] - avatar
+ 3
pow(a,b) is a function that can be imported from libaray- math. Synatx for importing math library is: In python: import math In C and CPP: #include<math.h> pow (a,b) means "a raised to the power of b" So, pow (27,1/3) is nothing but 27^(1/3)=3.
6th Sep 2019, 1:41 PM
SAGALPREET SINGH
SAGALPREET SINGH - avatar
+ 2
Advantages of using pow: ~ With pow you don't need to focus much on operation precedences. Advantages of using **: ~ ** can complete same tasks 20 times faster than pow.
6th Sep 2019, 1:57 PM
Seb TheS
Seb TheS - avatar