0% found this document useful (0 votes)
62 views30 pages

Exam 1 Review PDF

The document provides the rules and sample questions for a trivia game involving computer science topics. Players must buzz in and provide the correct answers written on paper for various multiple choice and calculation questions within a time limit to earn points for their team.

Uploaded by

Karl
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views30 pages

Exam 1 Review PDF

The document provides the rules and sample questions for a trivia game involving computer science topics. Players must buzz in and provide the correct answers written on paper for various multiple choice and calculation questions within a time limit to earn points for their team.

Uploaded by

Karl
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

ES 26 REVIEW

GAME RULES

• EACH TEAM WILL HAVE 2-3 MEMBERS


• EACH QUESTION WILL HAVE A CORRESPONDING NUMBER OF POINTS
(ALL OR NOTHING)
• ANSWERS (WRITTEN ON A SHEET OF PAPER) MUST BE SHOWN AFTER
THE BUZZER HAS SOUNDED
• FINAL ANSWERS MUST BE BOXED
READY??
WHAT ARE THE 4 MAIN HARDWARE
COMPONENTS OF A COMPUTER??
10 SECONDS, 2 POINTS
ANSWER

• CPU
• MEMORY
• INPUT
• OUTPUT
WHAT IS THE DECIMAL EQUIVALENT
OF 100112?
20 SECONDS, 2 POINTS
ANSWER

• 10011
=10011
16 8 4 2 1

= 16 + 2 + 1
= 19
WHAT IS THE DECIMAL EQUIVALENT
OF 5A216?
20 SECONDS, 2 POINTS
ANSWER

• 5A216
= 5*162 + 10*161 + 2*160
= 1280 + 160 + 2
= 1442
ANSWER

• 5 A 2 16

=0 1 0 1 1 0 1 0 0 0 1 0
2048 1024 512 256 128 64 32 16 8 4 2 1

= 1024 + 256 + 128 + 32 + 2


= 1442
WHAT IS THE BINARY EQUIVALENT
OF 271158?
20 SECONDS, 2 POINTS
ANSWER

• 2 7 1 1 5 8

= 010 111 001 001 101


= 0101110010011012
WHAT IS THE OCTAL EQUIVALENT
OF 321?
20 SECONDS, 2 POINTS
ANSWER

= 321/8
= 40 R 1
5 R 0
0 R 5
= 5018
GIVEN THE STATEMENT:
NOT (X>5 AND X<10 OR
(X%5 ==2 AND X<30))

WHAT WILL BE THE TRUTH VALUE IF


X=27?
20 SECONDS, 2 POINTS
ANSWER
NOT (X>5 AND X<10 OR
(X%5 ==2 AND X<30))
= NOT ((27>5) AND {(27<10) OR
[(27%5 ==2) AND (27<30)]})

= FALSE
WHAT WILL BE THE OUTPUT OF THE
FOLLOWING CODE?
20 SECONDS, 2 POINTS

x=5
if (x > 3 and x < 8):
print(“hello”)
elif (x > 2 and x < 10):
print(“hi”)
else:
print(“bye”)
ANSWER

x=5
if (x > 3 and x < 8): → RETURN TRUE!
print(“hello”)
elif (x > 2 and x < 10):
print(“hi”)
else:
print(“bye”)

“hello”
WHAT SHOULD BE THE VALUES/RANGE
FOR X SO THAT THE OUTPUT WILL BE “HI”?
20 SECONDS, 2 POINTS

x=5
if (x > 3 and x < 8):
print(“hello”)
elif (x > 2 and x < 10):
print(“hi”)
else:
print(“bye”)
ANSWER

2 < X ≤ 3 OR 8 ≤ X < 10
30 SECONDS, 3 POINTS

WHAT IS THE MISSING PART


OF THE FLOWCHART IF IT
PRODUCES THE FOLLOWING
RESULT:
Input: A = 10, B = 25

Output: A= 25, B = 10

END
ANSWER

• B = A-B
WHAT IS THE
OUTPUT IF I = 17
AND J = 10?
30 SECONDS, 3 POINTS

END
ANSWER

•1
WHAT IS THE
OUTPUT IF I = 385
AND J = 210?
30 SECONDS, 3 POINTS

END
ANSWER

• 35
END
ANSWER

1: I = A, J = B
2: L = A*B / J
WHAT’S WRONG WITH THE
FOLLOWING CODE?
1 POINT PER ERROR

1 x = 0
2 y=17
3 while x < 7:
4 if y == 3:
5 print("yo!")
6 elif y > 10: print("hello world"+y)
7 else:
8 x = x+1
9 y = y-2
ANSWER
1 x = 0
2 y=17
3 while x < 7:
4 if y == 3:
5 print("yo!") → indentation!!
6 elif y > 10: print("hello world"+y)
7 else: →adding string and int
8 x = x+1
9 y = y-2

You might also like