![]() ![]() |
| |||||||||
| This page removed for FERPA compliance | ||||||||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Very nice – does someREMOVEDnction require "variables" as input? Or can it be values, like someREMOVEDnction(1,2)? Mark Guzdial |
| Whatever comes after print will be evaluated – literally, Python will look for a value for what follows. print a will seek a value for a. Mark Guzdial |
| "for" actually walks a variable through a SEQUENCE. range(1,5) generates a sequence of [1,2,3,4]. getPixels(picture) generates a sequence of every pixel in the picture. getSamples(sound) generates a sequence of every sample in the sound. The "for" statement just makes the variable take each value in the sequence, one at a time, then execute the for's block. Mark Guzdial |