![]() ![]() |
| |||||||||
| This page removed for FERPA compliance | ||||||||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
range(1, 10, 3) means start at one, stop before you get to 10, and increment by 3. [1 + 3 * 0, 1 + 3 * 1, 1 + 3 * 2]-Student1680 |
| The variable x represents each item in the list one by one as the code below it is run. -Student1680 |
| Yes. That's how they relate. But when do you know when to use an indented block? -Student1680 |
take this code snippet for examplefor p in getPixels(picture):getPixels is actually a list of pixels. p represents each one of those pixels one by one. If there's a million pixels, then the "do stuff" below it executes a million times doing something to each one of those pixels. This is different from the common misconception that it magically does everything at once. -Student1680 |
| As far as "take in" and "take on" go, the action is the same. The difference is in who's doing what. A function "takes in" a value. A variable in the function "takes on" a value from the function "taking it in". -Student1680 |
| Yellow is 255,255,0. Purple is 255,0,255 Obviously yellow APPEARS lighter than purple. But the brightness is the same when you average all the numbers. Luminance is your PERCEPTION of the brightness. Yellow has a higher luminance than purple but the same brightness. -Student1680 |
| Your definition for print is a wee bit too specific. -Student1680 |
| good Student1919 |
| Yes. Where x is now 2 and y is now the string 'Fred'. -Student1680 |
| Yes. -Student1680 |
| Sorry to hear that. -Student2081 |
| colons are followed by def, for and if. It means that something is going to follow one of these statements -Student2081 |
| Correct -Student2081 |
| It is when you break up a complex program into smaller REMOVED managable parts. This makes it easier to find the reason for an error message -Student2081 |