Log in
Sign up for FREE
arrow_back
Library

Python Basics Quiz

star
star
star
star
star
Last updated almost 2 years ago
5 questions
1
Question 1
1.

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

1
1
1
1
Question 2
2.

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

Question 3
3.

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

Question 4
4.

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

Question 5
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()