CNIT 155 FINAL EXAM 2026 ACTUAL QUESTIONS AND
SOLUTIONS RATED A+
✔✔Python is considered a low-level language. T/F - ✔✔False
✔✔What is Syntax?
A. Rules that say what the program means
B. A translator between the programming language and machine code
C. A tool to find and repair bugs
D. Rules that say what programs look like, and how the statements in the programming
language are formed - ✔✔D. Rules that say what programs look like, and how the
statements in the programming language are formed
✔✔How many bytes are in a kilobyte?
A. 512
B. 8
C. 1000
D. 1024 - ✔✔D. 1024
✔✔Which of the following is not a device used to store data in a computer?
A. DVD
B. Flash Drive
C. Hard Drive
D. RAM - ✔✔D. RAM
✔✔A string is a numerical type of data. T/F - ✔✔False
✔✔Which of the following is an example of an integer?
A. True
B. "Hello, World!"
C. 4
D. 29.35 - ✔✔C. 4
✔✔What is the extension of the source file for a python program?
A. .python
B. .py
C. .source
D. .exe - ✔✔B. .py
✔✔String values can never be converted to integer values. T/F - ✔✔False
✔✔"Hello, World!" is a string T/F - ✔✔True
✔✔Which of the following displays a proper string literal?
,A. ProgrammerDialogue = 'Coding in python is fun!'
B. CNIT = *I am a CIT student.*
C. PurdueString = I attend Purdue University.
D. All the above - ✔✔A. ProgrammerDialogue = 'Coding in python is fun!'
✔✔Python needs a main function to operate. T/F - ✔✔False
✔✔Which of the following is an example of a comment in python?
A. // This is a comment in python.
B. # This is a comment in python.
C. $ This is a comment in python
D. * This is a comment in python. - ✔✔B. # This is a comment in python.
✔✔Which of the following is an example of a boolean value?
A. "Welcome"
B. True
C. 23.546
D. 4 - ✔✔B. True
✔✔Which of the following is a legal variable name?
A. student name
B. student-name
C. 1studentname
D. studentname1 - ✔✔D. studentname1
✔✔print() is an example of an input T/F - ✔✔False
✔✔Which of the following is true about an integer?
A. True is an integer
B. An integer is a textual data type
C. An integer can contain decimals
D. An integer can be stored as a variable - ✔✔D. An integer can be stored as a variable
✔✔Rules of naming identifiers include the following, except:
A. Can include a space.
B. Starting with a letter or an underscore, followed by a sequence of letters, digits, and
underscores.
C. The name is case sensitive.
D. The name must not be a reserved/keyword. - ✔✔A. Can include a space.
✔✔What is the name of the python functions that tells you a class's type?
A. Type
B. Print
C. Define
, D. Input - ✔✔A. Type
✔✔Values cannot be converted from one type to another T/F - ✔✔False
✔✔What is the value of the following expression?
9 + 3 * 2 ** 2 / (18-16) - ✔✔15
✔✔Which of the following operators has the highest priority in an expression?
A. +
B. /
C. ()
D. ** - ✔✔C. ()
✔✔Which is the output of the following code?
x = John
print("Hello ", x) - ✔✔Hello John
✔✔Which of the following is a proper name for a variable?
A. True
B. StudentID
C. Class Roster
D. 1studentname - ✔✔B. StudentID
✔✔What is the output of the following code?
Output =
print(int(Output)) - ✔✔5
✔✔Boolean values are case sensitive T/F - ✔✔True
✔✔The print function does not return a value T/F - ✔✔True
✔✔Which of the following import statements is correct to use math functions?
A. import math from *
B. import math
C. from * import math
D. from math import all - ✔✔B. import math
✔✔The ^ operator is the same as the ** operator in Python. T/F - ✔✔False
✔✔What is the output of the following code?
StudentIDJohn = 84219643
StudentIDEmily = 41305431
SOLUTIONS RATED A+
✔✔Python is considered a low-level language. T/F - ✔✔False
✔✔What is Syntax?
A. Rules that say what the program means
B. A translator between the programming language and machine code
C. A tool to find and repair bugs
D. Rules that say what programs look like, and how the statements in the programming
language are formed - ✔✔D. Rules that say what programs look like, and how the
statements in the programming language are formed
✔✔How many bytes are in a kilobyte?
A. 512
B. 8
C. 1000
D. 1024 - ✔✔D. 1024
✔✔Which of the following is not a device used to store data in a computer?
A. DVD
B. Flash Drive
C. Hard Drive
D. RAM - ✔✔D. RAM
✔✔A string is a numerical type of data. T/F - ✔✔False
✔✔Which of the following is an example of an integer?
A. True
B. "Hello, World!"
C. 4
D. 29.35 - ✔✔C. 4
✔✔What is the extension of the source file for a python program?
A. .python
B. .py
C. .source
D. .exe - ✔✔B. .py
✔✔String values can never be converted to integer values. T/F - ✔✔False
✔✔"Hello, World!" is a string T/F - ✔✔True
✔✔Which of the following displays a proper string literal?
,A. ProgrammerDialogue = 'Coding in python is fun!'
B. CNIT = *I am a CIT student.*
C. PurdueString = I attend Purdue University.
D. All the above - ✔✔A. ProgrammerDialogue = 'Coding in python is fun!'
✔✔Python needs a main function to operate. T/F - ✔✔False
✔✔Which of the following is an example of a comment in python?
A. // This is a comment in python.
B. # This is a comment in python.
C. $ This is a comment in python
D. * This is a comment in python. - ✔✔B. # This is a comment in python.
✔✔Which of the following is an example of a boolean value?
A. "Welcome"
B. True
C. 23.546
D. 4 - ✔✔B. True
✔✔Which of the following is a legal variable name?
A. student name
B. student-name
C. 1studentname
D. studentname1 - ✔✔D. studentname1
✔✔print() is an example of an input T/F - ✔✔False
✔✔Which of the following is true about an integer?
A. True is an integer
B. An integer is a textual data type
C. An integer can contain decimals
D. An integer can be stored as a variable - ✔✔D. An integer can be stored as a variable
✔✔Rules of naming identifiers include the following, except:
A. Can include a space.
B. Starting with a letter or an underscore, followed by a sequence of letters, digits, and
underscores.
C. The name is case sensitive.
D. The name must not be a reserved/keyword. - ✔✔A. Can include a space.
✔✔What is the name of the python functions that tells you a class's type?
A. Type
B. Print
C. Define
, D. Input - ✔✔A. Type
✔✔Values cannot be converted from one type to another T/F - ✔✔False
✔✔What is the value of the following expression?
9 + 3 * 2 ** 2 / (18-16) - ✔✔15
✔✔Which of the following operators has the highest priority in an expression?
A. +
B. /
C. ()
D. ** - ✔✔C. ()
✔✔Which is the output of the following code?
x = John
print("Hello ", x) - ✔✔Hello John
✔✔Which of the following is a proper name for a variable?
A. True
B. StudentID
C. Class Roster
D. 1studentname - ✔✔B. StudentID
✔✔What is the output of the following code?
Output =
print(int(Output)) - ✔✔5
✔✔Boolean values are case sensitive T/F - ✔✔True
✔✔The print function does not return a value T/F - ✔✔True
✔✔Which of the following import statements is correct to use math functions?
A. import math from *
B. import math
C. from * import math
D. from math import all - ✔✔B. import math
✔✔The ^ operator is the same as the ** operator in Python. T/F - ✔✔False
✔✔What is the output of the following code?
StudentIDJohn = 84219643
StudentIDEmily = 41305431