Twa kɔ nsɛm atitiriw so
Log in
Sign up for FREE
arrow_back
Laabri

Python Basics Quiz

star
star
star
star
star
Last updated about 2 years ago
5 Nsɛmmisa
1
Asemmisa {{asɛmmisaAhyɛnsode}}
1.

What is the output?

print "Chocolate Chip \nCookies”

1
Asemmisa {{asɛmmisaAhyɛnsode}}
2.

What is the output?

print 2**2 * 5

1
Asemmisa {{asɛmmisaAhyɛnsode}}
3.

What is the output?

name = "Sally"

num = 5

print ("Tell", name, "that it is", num)

1
1
Asemmisa {{asɛmmisaAhyɛnsode}}
4.

What is the output?

def area(length, width, height):

return length * width * height

print area(3,4,5)

Asemmisa {{asɛmmisaAhyɛnsode}}
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()