CS 160 FINAL EXAM |COMPLETE QUESTIONS WITH 100% RATED EXPERT
SOLUTIONS |2026 LATEST UPDATED
1. The chart shows the frequency of searches for the words "pencil" and "pen"
over a 5 year period. Which of the following is the best interpretation of the
chart?: At any point in time there are typically more people searching for the word "pen" than "pencil"
2. Why is the language of a computer binary?: It's easier, cheaper, and more reliable to build machines and
devices that only have to distinguish between binary states.
3. What is the 4-bit binary number for the decimal number Eleven (11)?: 1011 4. What is the minimum number of
bits you would need to encode the 26 letters of the alphabet plus a space - a total of 27 characters?: 5 bits 5. What is
the decimal equivalent to the binary number 00001101 ?: 13
6. A computer program uses 4 bits to represent nonnegative integers. Which of the following statements describe a
possible result when the program uses this number representation?
I. The operation 4 + 8 will result in an overflow error.
II. The operation 7 + 10 will result in an overflow error.
III. The operation 12 + 3 will result in an overflow error.: II only
7. What is the decimal equivalent to the binary number 10101010 ?: 170
8. What is the decimal equivalent to the binary number 11110000 ?: 240
9. Convert decimal 23 to an 8 bit binary number.: 10111
10. Convert decimal 209 to an 8 bit binary number.: 11010001
11. How many bits would you need if you wanted to have the ability to count up to 100?: 7
,12. How many different numbers can 6 bits represent?: 64
13. If 2 bits can represent 2^2 values, and 3 bits can represent 2^3 values, and
4 bits can represent 2^4 values, then n bits can represent:: 2^n values
14. What are the 4 processes every computer performs?: input, output, processing,
storage
15. In the expression 12.45 + 3.6, the values to the right and left of the + symbol are the ________.: operands
16. A(n) ________ is a name that represents a value stored in the computer's memory.: variable
17. The ________ statement is used to create a decision structure.: selection
18 What is Step 1 in a Selection Sort algorithm?: 1. Set MIN to index 0
19. The two basic operations in sorting algorithms are:: Comparison Operation, Swap Operation
20. One con of using linear search is:: it does not scale well to large lists
21. Which of the following statements are true about routers and routing on the Internet. Choose two answers.
1. Routers act independently and route packets as they see fit.
2. Routers are hierarchical and the "root" router is responsible for communicating to sub-routers the best paths for
them to route internet traffic.
3. Protocols ensure that a single path between two computers is established before sending packets over it.
4. A packet traveling between two computers on the Internet may be rerouted many times along the way or even lost
or "dropped".: 1 and 4
22. What will the following code print to the console window when executed: print("Python is cool!"): Python is
cool!
, 23. In Python the ________ symbol is used as the equality operator.: "=="
24. A Boolean variable can reference one of two values which are:: True or False.
25. When applying the .3f formatting specifier to the number 76.15854, the result is ________.: 76.159
26. ________ are notes of explanation that document lines or sections of a program.: Comments
27. Which of the following is the correct if clause to determine whether choice is anything other than 10?: if choice
!= 10:
28. Which of the following allows users to refer to Web sites using names, such as example.com, rather than
numbers, such as 93.184.216.34 ?: The domain name system (DNS)
29. A(n) ________ statement will execute one block of statements if its condition is true or another block if its
condition is false.: if-else
30. The % symbol is the remainder operator, also known as the ________ operator.: modulus
31. Which components in the list would be considered "input" devices?: keyboard, mouse, touch screen
32. After the execution of the following statement, the variable sold will reference the numeric literal value as (n)
________ data type.sold = 256.752: float 33. A(n) ________ loop usually occurs when the programmer does not
include code inside the loop that makes the test condition false.: infinite 34. What will be the output after the
following code is executed? (See image): Science, Computer
35. The ________ built-in function is used to read a number that has been typed on the
keyboard.: input()
36. The chart above shows the frequency of searches for the words "pencil" and "pen" over a 5 year period. Which
of the following is the best interpretation of the chart above?
(See image): At any point in time there are typically more people searching for the word "pen" than "pencil"
SOLUTIONS |2026 LATEST UPDATED
1. The chart shows the frequency of searches for the words "pencil" and "pen"
over a 5 year period. Which of the following is the best interpretation of the
chart?: At any point in time there are typically more people searching for the word "pen" than "pencil"
2. Why is the language of a computer binary?: It's easier, cheaper, and more reliable to build machines and
devices that only have to distinguish between binary states.
3. What is the 4-bit binary number for the decimal number Eleven (11)?: 1011 4. What is the minimum number of
bits you would need to encode the 26 letters of the alphabet plus a space - a total of 27 characters?: 5 bits 5. What is
the decimal equivalent to the binary number 00001101 ?: 13
6. A computer program uses 4 bits to represent nonnegative integers. Which of the following statements describe a
possible result when the program uses this number representation?
I. The operation 4 + 8 will result in an overflow error.
II. The operation 7 + 10 will result in an overflow error.
III. The operation 12 + 3 will result in an overflow error.: II only
7. What is the decimal equivalent to the binary number 10101010 ?: 170
8. What is the decimal equivalent to the binary number 11110000 ?: 240
9. Convert decimal 23 to an 8 bit binary number.: 10111
10. Convert decimal 209 to an 8 bit binary number.: 11010001
11. How many bits would you need if you wanted to have the ability to count up to 100?: 7
,12. How many different numbers can 6 bits represent?: 64
13. If 2 bits can represent 2^2 values, and 3 bits can represent 2^3 values, and
4 bits can represent 2^4 values, then n bits can represent:: 2^n values
14. What are the 4 processes every computer performs?: input, output, processing,
storage
15. In the expression 12.45 + 3.6, the values to the right and left of the + symbol are the ________.: operands
16. A(n) ________ is a name that represents a value stored in the computer's memory.: variable
17. The ________ statement is used to create a decision structure.: selection
18 What is Step 1 in a Selection Sort algorithm?: 1. Set MIN to index 0
19. The two basic operations in sorting algorithms are:: Comparison Operation, Swap Operation
20. One con of using linear search is:: it does not scale well to large lists
21. Which of the following statements are true about routers and routing on the Internet. Choose two answers.
1. Routers act independently and route packets as they see fit.
2. Routers are hierarchical and the "root" router is responsible for communicating to sub-routers the best paths for
them to route internet traffic.
3. Protocols ensure that a single path between two computers is established before sending packets over it.
4. A packet traveling between two computers on the Internet may be rerouted many times along the way or even lost
or "dropped".: 1 and 4
22. What will the following code print to the console window when executed: print("Python is cool!"): Python is
cool!
, 23. In Python the ________ symbol is used as the equality operator.: "=="
24. A Boolean variable can reference one of two values which are:: True or False.
25. When applying the .3f formatting specifier to the number 76.15854, the result is ________.: 76.159
26. ________ are notes of explanation that document lines or sections of a program.: Comments
27. Which of the following is the correct if clause to determine whether choice is anything other than 10?: if choice
!= 10:
28. Which of the following allows users to refer to Web sites using names, such as example.com, rather than
numbers, such as 93.184.216.34 ?: The domain name system (DNS)
29. A(n) ________ statement will execute one block of statements if its condition is true or another block if its
condition is false.: if-else
30. The % symbol is the remainder operator, also known as the ________ operator.: modulus
31. Which components in the list would be considered "input" devices?: keyboard, mouse, touch screen
32. After the execution of the following statement, the variable sold will reference the numeric literal value as (n)
________ data type.sold = 256.752: float 33. A(n) ________ loop usually occurs when the programmer does not
include code inside the loop that makes the test condition false.: infinite 34. What will be the output after the
following code is executed? (See image): Science, Computer
35. The ________ built-in function is used to read a number that has been typed on the
keyboard.: input()
36. The chart above shows the frequency of searches for the words "pencil" and "pen" over a 5 year period. Which
of the following is the best interpretation of the chart above?
(See image): At any point in time there are typically more people searching for the word "pen" than "pencil"