Preskoči na glavni sadržaj
Prijava
Sign up for FREE
arrow_back
Biblioteka

Semester Final Comp Sci 1 (1/12/2024)

star
star
star
star
star
Posljednje ažuriranje about 2 years ago
20
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Pitanje 1
1.

What is output by the code below?

print("Comp Sci")

print("Rocks")

Pitanje 2
2.

What is output by the code below?

print("I am a \tninja")

Pitanje 3
3.

What is output by the following code?

print("Math and \nScience")

Pitanje 4
4.

What is output by the following code?

game = "chess"

print("Play")

print(game)

Pitanje 5
5.

What is output by the code below?

p1 = "cherry"

p2 = "chocolate"

print("Do you want", p2, "or", p1, "pie?")

Pitanje 6
6.

What is output by the code below?

print((11%4)+3)

Pitanje 7
7.

What is output by the code below?

print((13//2)+17)

Pitanje 8
8.

What is output by the code below?

print(11.0/2)

Pitanje 9
9.

What is output by the code below?

num = 21

num = num + 7

print(num)

Pitanje 10
10.

What is output by the code below?

x = 54

y = 3.5

print(x-y)

Pitanje 11
11.

What is output by the code below?

def area(width,length):

return width * length

print(area(2,2))

Pitanje 12
12.

What is output by the code below?

def area(width,length):

return width * length

print(area(6,5))

Pitanje 13
13.

What is output by the code below?

def double(word):

print(word, word)

double("aplus")

Pitanje 14
14.

What is output by the code below?

def tripleIt(word):

print(word, word, word)

tripleIt("tree")

Pitanje 15
15.

What is output by the code below?

def driving(vehicle):

print("You are driving a", vehicle)

driving("van")

Pitanje 16
16.

What is output by the code below?

def volume(width, length, height):

return width * length * height

print(volume(2,2,2))

Pitanje 17
17.

What is output by the code below?

def volume(width, length, height):

return width * length * height

print(volume(2,3,4))

Pitanje 18
18.

What is output by the code below?

def singing(song):

print("They are singing",)

print(song)

singing("Twinkle Twinkle Little Star")

Pitanje 19
19.

What is output by the code below?

def slope(deltaX, deltaY):

return deltaY/deltaX

print(slope(4,8.0))

Pitanje 20
20.

What is output by the code below?

def sayStuff():

print("Hello")

print("World")

sayStuff()