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

On 6.189 Handout 1Exercise 1.4 can someone explain the equations to me please? Maths was never my strong point especially when it came to understanding equations.

OpenStudy (espex):

What part is giving you trouble?

OpenStudy (anonymous):

Just the symbols really.

OpenStudy (espex):

There are a few there, could you be specific? :D

OpenStudy (anonymous):

Number 2 above the 7 + 9 I would assume its divide. But on number 4 the same symbol is there but with a small number 4.

OpenStudy (espex):

Do you mean part II where it has \(\frac{3*5}{2+3}\)?

OpenStudy (espex):

OH, you mean the root \(\sqrt{}\)

OpenStudy (anonymous):

Yeah. What on earth do the symbol mean?

OpenStudy (espex):

The first one, \(\sqrt{7+9}\) is a square root symbol, it represents the number (when multiplied by itself) equals 16, which is 7+9.

OpenStudy (espex):

The second one, \(\sqrt[4]{-19+100}\) is a 4th root and it represents the number (when multiplied by itself 4 times) equals 81, which is -19+100.

OpenStudy (espex):

In the first example, can you determine the number, when multiplied by itself (or squared) gives you 16?

OpenStudy (anonymous):

Is the first one not asking for the square root of 16 x 2?

OpenStudy (anonymous):

Which is 8.

OpenStudy (espex):

Exactly.

OpenStudy (espex):

And the 4th root of 81?

OpenStudy (anonymous):

324

OpenStudy (espex):

For the 4th root, you are wanting a number that multiplies itself 4 times to equal 81. For example, the 4th root of 16 is 2, because 2*2*2*2=16

OpenStudy (anonymous):

20.25 which is a float.

OpenStudy (anonymous):

Nope Hang on

OpenStudy (anonymous):

3. But that was trial and error to figure out.

OpenStudy (espex):

Nice work.

OpenStudy (espex):

An easier way would be to realize that 81 has a square root of 9, since 9*9=81 Also, the square root of 9 is 3, since 3*3=9. Place into your previous example and you have 3*3*3*3=81

OpenStudy (espex):

However this is a programming class, so you don't care so much about the math. :)

OpenStudy (anonymous):

And number 3 is just the result of 4-7 * 3 effectively?

OpenStudy (anonymous):

Question 3 i mean.

OpenStudy (espex):

That is the result of 4-7, cubed.

OpenStudy (espex):

So you subtract 7 from 4, then you take the result and multiply it by itself 3 times.

OpenStudy (anonymous):

Hah I was originally going to say that. But that is what I meant. I'm not good at maths when it's explained in the way it was set out as maths equations and formula were never my strong point, heck my maths is below average I'd say. But having it explained by you means i have a rough idea now on how to code it and get a correct result.

OpenStudy (espex):

That's good, I would hate to be confusing things further. :P

OpenStudy (anonymous):

A shame I can only give you one "Best Response" medal. Cheers very much.

OpenStudy (espex):

It all works out, eventually you'll ask another question on a new thread and I can try and gain another medal. :D

OpenStudy (anonymous):

eSpeX - how to you write 4thRoot in python without too much hassle? I tried 4*sqrt(-11+100) and that was off.

OpenStudy (anonymous):

I think you sqrt the number and then sqrt the result?

OpenStudy (espex):

The equation you wrote is multiplying 4 by the square root of -11+100. I chose to write it as a fractional exponent: print ((-19+100)**(1/4.0))

OpenStudy (anonymous):

I need more math lessons. Ha. But that seems to make sense. The sqrt of x is x ** 1/2.0 or .5 and that makes 1/4.00 the quad root? Ha...

OpenStudy (espex):

Yes, exactly.

OpenStudy (anonymous):

+1, like, upvote, whatever this place does... Thanks for helping.

OpenStudy (espex):

It's the "Best Response" buttons on the replies, and you are welcome.

OpenStudy (anonymous):

Coming back to this equation 7 + 9 = 16 16 x 2 = 32 Sqrt of 32 = 5.65 Is that right or have I muddled myself up again?

OpenStudy (anonymous):

\[\sqrt{7+9} \times2\]

OpenStudy (anonymous):

you want to do the sqrt first then multiple x 2

OpenStudy (anonymous):

Order of operations looks at a sqrt the same as parenthesis, I believe. They come first. so the step is this: 7+9 = 16 the sqrt of 16 is 4. 4 * 2 is 8. At least that's my understanding.

OpenStudy (anonymous):

sqrt(7+9) * 2

OpenStudy (espex):

Exactly.

OpenStudy (anonymous):

Yeah made sense as soon as you said it. Problem is I had it last night thanks to eSpeX but having been to sleep and work, coming back to code it, the damn thing just wasn't fresh in my mind anymore.

OpenStudy (espex):

If you think about the order of operations, PEMDAS, the root is an exponent, and so it would be carried out before the multiplication.

OpenStudy (anonymous):

Once we have completed the code in the assignments how would we go about comparing it with each others code?

OpenStudy (espex):

You can always post it onto one of the paste sites.

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!
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!