Python Basics Quiz

By Mickey Arnold
Last updated 10 months ago
5 Questions

What is the output?
print "Chocolate Chip \nCookies”

What is the output?
print 2**2 * 5

What is the output?
name = "Sally"
num = 5
print ("Tell", name, "that it is", num)

What is the output?
def area(length, width, height):
return length * width * height
print area(3,4,5)

What is the output?
class song:
def __init__(self, name): self.name = name
def play(self):
print "Playing", self.name
mySong = song("ABC's")
mySong.play()