CSE 6040X SP24 COMPREHENSIVE EXAM
STUDY GUIDE WITH COMPLETE
SOLUTIONS
●● Interpreter (1.1)
Answer: CPython
reads code line by line and translates it into machine-understandable
language, and executes it
●● Compilation (1.1)
Answer: Translates the entire source code into machine code or bytecode
before execution
●● Compiler (1.1)
Answer: Program that does the compilation for the entire source code
before executing
●● Lexis (1.1)
Answer: Dictionary of a programming language
●● Syntax (1.1)
Answer: Grammar of a programming language
,●● Semantics (1.1)
Answer: The meaning behind the code. i.e. what the code does
●● keywords (1.2)
Answer: They have specific meanings in python and cant be used as
variables or functions
●● instructions (1.2)
Answer: Each line of code operates one at a time from the top down
●● Indentation (1.2)
Answer: Tabs used to visually organize code
●● Comments (1.2)
Answer: #provide people reading the code some perspective
●● Literals (1.3)
Answer: Integers
Floating-point numbers
Strings
Booleans
, ●● Boolean (1.3)
Answer: True or False
0 or 1
BooLean
●● Integer (1.3)
Answer: Whole number
int()
●● Floating-point numbers (1.3)
Answer: Number has a decimal
float()
●● Scientific notation (1.3)
Answer: a number as the product of a coefficient and a power of 10
300,000 == 3 x 10^5
●● Strings (1.3)
Answer: " 'Data in parenthesis' "
Can add quotes inside quotes by alternating between single and double
quotes or using escape character \\
STUDY GUIDE WITH COMPLETE
SOLUTIONS
●● Interpreter (1.1)
Answer: CPython
reads code line by line and translates it into machine-understandable
language, and executes it
●● Compilation (1.1)
Answer: Translates the entire source code into machine code or bytecode
before execution
●● Compiler (1.1)
Answer: Program that does the compilation for the entire source code
before executing
●● Lexis (1.1)
Answer: Dictionary of a programming language
●● Syntax (1.1)
Answer: Grammar of a programming language
,●● Semantics (1.1)
Answer: The meaning behind the code. i.e. what the code does
●● keywords (1.2)
Answer: They have specific meanings in python and cant be used as
variables or functions
●● instructions (1.2)
Answer: Each line of code operates one at a time from the top down
●● Indentation (1.2)
Answer: Tabs used to visually organize code
●● Comments (1.2)
Answer: #provide people reading the code some perspective
●● Literals (1.3)
Answer: Integers
Floating-point numbers
Strings
Booleans
, ●● Boolean (1.3)
Answer: True or False
0 or 1
BooLean
●● Integer (1.3)
Answer: Whole number
int()
●● Floating-point numbers (1.3)
Answer: Number has a decimal
float()
●● Scientific notation (1.3)
Answer: a number as the product of a coefficient and a power of 10
300,000 == 3 x 10^5
●● Strings (1.3)
Answer: " 'Data in parenthesis' "
Can add quotes inside quotes by alternating between single and double
quotes or using escape character \\