def forExample1(): for indexVariable in range(1,10): print indexVariable def getPixelsExample (): file = pickAFile (); pict = makePicture(file); openPictureTool (pict) for pix in getPixels(pict): value = getRed (pix); newValue = value * 0.5; setRed (pix, newValue); openPictureTool (pict) def getPicture(): file = pickAFile (); pict = makePicture(file); openPictureTool (pict) def decreaseRed2 (amount): file = pickAFile (); pict = makePicture(file); openPictureTool (pict) for pix in getPixels(pict): value = getRed (pix); newValue = value * amount; setRed (pix, newValue); openPictureTool (pict)