Semester Final Comp Sci 1
star
star
star
star
star
Last updated over 1 year ago
40 questions
1
What is output by the code below?print("Comp Sci")print("Rocks")
What is output by the code below?
print("Comp Sci")
print("Rocks")
1
What is output by the code below?print("I am a \tninja")
What is output by the code below?
print("I am a \tninja")
1
What is output by the following code?print("Math and \nScience")
What is output by the following code?
print("Math and \nScience")
1
What is output by the following code?game = "chess"print("Play")print(game)
What is output by the following code?
game = "chess"
print("Play")
print(game)
1
What is output by the code below?p1 = "cherry"p2 = "chocolate"print("Do you want", p2, "or", p1, "pie?")
What is output by the code below?
p1 = "cherry"
p2 = "chocolate"
print("Do you want", p2, "or", p1, "pie?")
1
What is output by the code below?print((11%4)+3)
What is output by the code below?
print((11%4)+3)
1
What is output by the code below?print((13//2)+17)
What is output by the code below?
print((13//2)+17)
1
What is output by the code below?print(11.0/2)
What is output by the code below?
print(11.0/2)
1
What is output by the code below?num = 21num = num + 7print(num)
What is output by the code below?
num = 21
num = num + 7
print(num)
1
What is output by the code below?x = 54y = 3.5print(x-y)
What is output by the code below?
x = 54
y = 3.5
print(x-y)
1
What is output by the code below?def area(width,length): return width * length
print(area(2,2))
What is output by the code below?
def area(width,length):
return width * length
print(area(2,2))
1
What is output by the code below?def area(width,length): return width * length
print(area(6,5))
What is output by the code below?
def area(width,length):
return width * length
print(area(6,5))
1
What is output by the code below?def double(word): print(word, word)
double("aplus")
What is output by the code below?
def double(word):
print(word, word)
double("aplus")
1
What is output by the code below?def tripleIt(word): print(word, word, word)
tripleIt("tree")
What is output by the code below?
def tripleIt(word):
print(word, word, word)
tripleIt("tree")
1
What is output by the code below?def driving(vehicle): print("You are driving a", vehicle)
driving("van")
What is output by the code below?
def driving(vehicle):
print("You are driving a", vehicle)
driving("van")
1
What is output by the code below?def volume(width, length, height): return width * length * height
print(volume(2,2,2))
What is output by the code below?
def volume(width, length, height):
return width * length * height
print(volume(2,2,2))
1
What is output by the code below?def volume(width, length, height): return width * length * heightprint(volume(2,3,4))
What is output by the code below?
def volume(width, length, height):
return width * length * height
print(volume(2,3,4))
1
What is output by the code below?def singing(song): print("They are singing",) print(song)
singing("Twinkle Twinkle Little Star")
What is output by the code below?
def singing(song):
print("They are singing",)
print(song)
singing("Twinkle Twinkle Little Star")
1
What is output by the code below?def slope(deltaX, deltaY): return deltaY/deltaX
print(slope(4,8.0))
What is output by the code below?
def slope(deltaX, deltaY):
return deltaY/deltaX
print(slope(4,8.0))
1
What is output by the code below?def sayStuff(): print("Hello")
print("World")
sayStuff()
What is output by the code below?
def sayStuff():
print("Hello")
print("World")
sayStuff()
1
What is output by the code below?print("left" == "right" or False == False)
What is output by the code below?
print("left" == "right" or False == False)
1
What is output by the code below?print("cat" != "dog")
What is output by the code below?
print("cat" != "dog")
1
What is output by the code below?grade = 85print (grade < 70)
What is output by the code below?
grade = 85
print (grade < 70)
1
What is output by the code below?
greaterThan = 15 > 10print(greaterThan)
What is output by the code below?
greaterThan = 15 > 10
print(greaterThan)
1
What is output by the code below?temp = 19if temp >=212: print("Boiling")elif temp <= 32: print("Freezing")
What is output by the code below?
temp = 19
if temp >=212:
print("Boiling")
elif temp <= 32:
print("Freezing")
1
What is output by the code below?x = 250width = 50print("Moving Right")if x + width > 800: print("Hit Edge")
What is output by the code below?
x = 250
width = 50
print("Moving Right")
if x + width > 800:
print("Hit Edge")
1
What is output by the code below?score = 200highScore = 310if score > highScore: print("You beat the high score by", score-highScore, "points!")else: print("You needed", highScore - score, "points")
What is output by the code below?
score = 200
highScore = 310
if score > highScore:
print("You beat the high score by", score-highScore, "points!")
else:
print("You needed", highScore - score, "points")
1
What is output by the code below?numPens = 3if numPens < 2: print("I don't have any extras")else: print("Yes, you can borrow one")
What is output by the code below?
numPens = 3
if numPens < 2:
print("I don't have any extras")
else:
print("Yes, you can borrow one")
1
What is output by the code below?answer = "cup"if answer != "yes": print("Game Over")else: print("Game Start")
What is output by the code below?
answer = "cup"
if answer != "yes":
print("Game Over")
else:
print("Game Start")
1
What is output by the code below?pie = "cherry"print("Shopping List \neggs \nflour")if pie == "cherry": print("cherries")
What is output by the code below?
pie = "cherry"
print("Shopping List \neggs \nflour")
if pie == "cherry":
print("cherries")
1
What is output by the code below?for x in range(4): print(x, end = " " )
What is output by the code below?
for x in range(4):
print(x, end = " " )
1
What is output by the code below?for n in "numbers": print(n, end = " " )
What is output by the code below?
for n in "numbers":
print(n, end = " " )
1
What is output by the code below?for x in range(5): print("Hi", end = " " )
What is output by the code below?
for x in range(5):
print("Hi", end = " " )
1
What is output by the code below?for x in range(3): print("light", end = " " )
What is output by the code below?
for x in range(3):
print("light", end = " " )
1
What is output by the code below?sum = 0for t in range(5): sum += tprint(sum)
What is output by the code below?
sum = 0
for t in range(5):
sum += t
print(sum)
1
What is output by the code below?for s in range(4, 8): print(s, end = " " )
What is output by the code below?
for s in range(4, 8):
print(s, end = " " )
1
What is output by the code below?i = 0while i < 0: i += 5print(i)
What is output by the code below?
i = 0
while i < 0:
i += 5
print(i)
1
What is output by the code below?j = 0while( j < 6 ): j += 4print(j)
What is output by the code below?
j = 0
while( j < 6 ):
j += 4
print(j)
1
What is output by the code below?r = 1while( r < 20 ): r *= 2print(r)
What is output by the code below?
r = 1
while( r < 20 ):
r *= 2
print(r)
1
What is output by the code below?w = 20while w < 50: w += w // 2print(w)
What is output by the code below?
w = 20
while w < 50:
w += w // 2
print(w)