Ask your own question, for FREE!
MIT 6.189 A Gentle Introduction to Programming Using Python (OCW) 7 Online
OpenStudy (anonymous):

I'm stuck into the 1.4 exercise when it asks me to print some equation. How can I do the square root operation correctly in python?

OpenStudy (zeeporo):

First you have to "import math" in order that you can call the square root function "math.sqrt(number)". Or you can try to squaring to the broken-number 1/2. "number ** (0.5)"

OpenStudy (anonymous):

Perfect! Thx! :D

OpenStudy (anonymous):

or you can also do with negative number "number**(-2)"

OpenStudy (anonymous):

@zlatandebian number**(-2) is equivalent to : \[\frac{ 1 }{ number ^{2} }\] Not the square root.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
17 hours ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
20 hours ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Arizona: does anyone know the percentage rate of 30,000 and 40,000
1 week ago 0 Replies 0 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!