Page 2 of 2

Re: intro to Python (programming) free course, anyone else d

Posted: Mon Oct 07, 2013 3:29 pm
by htsamurai
so in one of the vids this question comes up

In Python 2 (the version of Python that we are learning), what is the value of -9 / 4?

and the answer given is 3.
because:
"Remember that in Python 2, the result of dividing two integers is another integer. (The exact answer rounded down to the nearest integer.)"

wouldn't that make the right answer 2, though? being that the exact answer would be 2.25, if we're rounding down to the nearest integer and all...?

Re: intro to Python (programming) free course, anyone else d

Posted: Mon Oct 07, 2013 10:10 pm
by mr.e
-9/4 = -2.25

The answer is -3 because you're rounding DOWN to the nearest NEGATIVE integer. Dig?

That question tripped me up too, took me a minute to get.

Re: intro to Python (programming) free course, anyone else d

Posted: Tue Oct 08, 2013 6:44 am
by htsamurai
oh snap son, negatives, duh haha
thanks big homie :D

Re: intro to Python (programming) free course, anyone else d

Posted: Tue Oct 08, 2013 6:46 am
by htsamurai
oldangelmidnight wrote:I didn't see Programming for Musicians and Digital Signal Processing. Sounds cool.
just saw this, here ya go bruhbruh

https://www.coursera.org/course/chuck101
https://www.coursera.org/course/dsp

Re: intro to Python (programming) free course, anyone else d

Posted: Tue Oct 08, 2013 10:43 am
by odontophobia
mr.e wrote:-9/4 = -2.25

The answer is -3 because you're rounding DOWN to the nearest NEGATIVE integer. Dig?

That question tripped me up too, took me a minute to get.
for some reason I got this right instantly but I didn't even process it.

I'm through all but the "project" video for this week. I'll be doing that tonight after work or tomorrow with my day off.

It's pretty exciting. I'm pretty stoked for this.

Re: intro to Python (programming) free course, anyone else d

Posted: Tue Oct 08, 2013 2:35 pm
by oldangelmidnight
htsamurai wrote:
oldangelmidnight wrote:I didn't see Programming for Musicians and Digital Signal Processing. Sounds cool.
just saw this, here ya go bruhbruh

https://www.coursera.org/course/chuck101
https://www.coursera.org/course/dsp
Thanks. ChucK seems like a strange choice for a class. I guess I was under the impression that C++ would be the language to use...

Re: intro to Python (programming) free course, anyone else d

Posted: Wed Oct 09, 2013 3:01 pm
by zRobertez
I learned to program on javascript. blech. Python looks a lot nicer lol.
You can get a free trial at lynda.com. There are some handy videos there. Intro to object oriented programming and some other vids like that were helpful for me. He uses java but it is more about picking up the basics and the terminology.