CNIT 155 CORE EXAM TEST 2026 QUESTIONS AND
SOLUTIONS RATED A+
✔✔Which of the following is true about an integer? - ✔✔An integer can be stored as a
variable
✔✔T or F: Boolean only has two possible values. - ✔✔True
✔✔Which of the following is an example of a boolean value? - ✔✔True
✔✔T or F: "Hello, World!" is a string - ✔✔True
✔✔Which of the following displays a proper string literal? - ✔✔ProgrammingDialogue =
'Coding in python is fun!'
✔✔Which of the following is an example of a comment in python? - ✔✔# This is a
comment in python
✔✔What is the name of the python function that tells you a class? - ✔✔Type
✔✔T or F: A string is a numerical type of data. - ✔✔False
✔✔What is the extension of the source file for a python program? - ✔✔.py
✔✔Which of the following is a legal variable name? - ✔✔studentname1
✔✔Rules of naming identifiers include the following, except: - ✔✔Can include a space
✔✔T or F: Values cannot be converted from one type to another. - ✔✔False
✔✔What is Semantics? - ✔✔Rules that say what the program means
✔✔What is Machine Code? - ✔✔Numbers treated as instructions by the CPU. EX: 05
01 23
✔✔What is Assembly Code? - ✔✔Humanly readable way of writing machine code.
EX:
add EAX, 1
mov [ESP+4], EAX
✔✔When is Assembly code used? - ✔✔In small devices where the size of code is
important, in hardware specific code like device drivers, where performance is critical
, ✔✔T or F: High-level language can be translated into many different machine code
languages for different processors. - ✔✔True
✔✔What is a Source Program? - ✔✔A program written in a high-level language
✔✔What is Interpreter? - ✔✔Translates the statements and executes the statements in
order
✔✔What is Compiler? - ✔✔Translates statements in a language into machine code
✔✔What is IDE? - ✔✔Integrated development environment that combines several
programming tools together into one cohesive program
✔✔What is the structure of a Python Program? - ✔✔def main ():
Indentation
and
blocks
main ();
✔✔T or F: Comments should say why you are doing something. - ✔✔True
✔✔What is a String Literal? - ✔✔A stream of characters enclosed in double quotes
✔✔What does \n do? - ✔✔Inserts a new line in the output
✔✔What does \t do? - ✔✔Inserts a tab
✔✔What does \\ do? - ✔✔Displays \
✔✔What does \" do? - ✔✔Displays "
✔✔What are the three phases of solving any problem? - ✔✔Inputs, then Processing,
then Outputs
✔✔What is the data in a program? - ✔✔Data value, data types, data name, data
conversion
✔✔What is Data Value? - ✔✔A value is one of the fundamental things, like a word or a
number, that a program manipulates
✔✔What is Data Type? - ✔✔Data values can be classified into different classes
✔✔These are examples of numerical data types - ✔✔Integers, Floating point numbers,
complex numbers
SOLUTIONS RATED A+
✔✔Which of the following is true about an integer? - ✔✔An integer can be stored as a
variable
✔✔T or F: Boolean only has two possible values. - ✔✔True
✔✔Which of the following is an example of a boolean value? - ✔✔True
✔✔T or F: "Hello, World!" is a string - ✔✔True
✔✔Which of the following displays a proper string literal? - ✔✔ProgrammingDialogue =
'Coding in python is fun!'
✔✔Which of the following is an example of a comment in python? - ✔✔# This is a
comment in python
✔✔What is the name of the python function that tells you a class? - ✔✔Type
✔✔T or F: A string is a numerical type of data. - ✔✔False
✔✔What is the extension of the source file for a python program? - ✔✔.py
✔✔Which of the following is a legal variable name? - ✔✔studentname1
✔✔Rules of naming identifiers include the following, except: - ✔✔Can include a space
✔✔T or F: Values cannot be converted from one type to another. - ✔✔False
✔✔What is Semantics? - ✔✔Rules that say what the program means
✔✔What is Machine Code? - ✔✔Numbers treated as instructions by the CPU. EX: 05
01 23
✔✔What is Assembly Code? - ✔✔Humanly readable way of writing machine code.
EX:
add EAX, 1
mov [ESP+4], EAX
✔✔When is Assembly code used? - ✔✔In small devices where the size of code is
important, in hardware specific code like device drivers, where performance is critical
, ✔✔T or F: High-level language can be translated into many different machine code
languages for different processors. - ✔✔True
✔✔What is a Source Program? - ✔✔A program written in a high-level language
✔✔What is Interpreter? - ✔✔Translates the statements and executes the statements in
order
✔✔What is Compiler? - ✔✔Translates statements in a language into machine code
✔✔What is IDE? - ✔✔Integrated development environment that combines several
programming tools together into one cohesive program
✔✔What is the structure of a Python Program? - ✔✔def main ():
Indentation
and
blocks
main ();
✔✔T or F: Comments should say why you are doing something. - ✔✔True
✔✔What is a String Literal? - ✔✔A stream of characters enclosed in double quotes
✔✔What does \n do? - ✔✔Inserts a new line in the output
✔✔What does \t do? - ✔✔Inserts a tab
✔✔What does \\ do? - ✔✔Displays \
✔✔What does \" do? - ✔✔Displays "
✔✔What are the three phases of solving any problem? - ✔✔Inputs, then Processing,
then Outputs
✔✔What is the data in a program? - ✔✔Data value, data types, data name, data
conversion
✔✔What is Data Value? - ✔✔A value is one of the fundamental things, like a word or a
number, that a program manipulates
✔✔What is Data Type? - ✔✔Data values can be classified into different classes
✔✔These are examples of numerical data types - ✔✔Integers, Floating point numbers,
complex numbers