


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



def countdown(number): for index in range(number): result = printStringN("Hi", index) tempNum = result + 1 print(tempNum) Draw a stack diagram for the following function call: countdown( 1 )
main
countdown number = 1 index = 0 result = 7 tempNum = 8
printStringN in_string = "Hi!" numToPrint = 0
def fade(picture): for px in getPixels(picture): color = getColor(px) makeDarker(color) setColor(px, color)
repaint(picture)
EC. What do these 3 lines of code do and how would it negatively affect
your computer? import os os.startfile(”startfiles.py”) os.startfile(”startfiles.py”)
It would open up an endless amount of windows and ultimately crash your computer.