30 Questions
What is a key feature of Python that makes it more readable?
It uses English keywords frequently
What programming methods does Python support?
Functional and structured programming, as well as object-oriented programming
What is a benefit of Python's automatic garbage collection?
It frees the developer from worrying about memory management
What environment variable tells the Python interpreter where to locate module files?
PYTHONPATH
What is the correct function to convert a string into a floating point number?
float()
What environment variable is used in Windows to instruct Python to find the first case-insensitive match in an import statement?
PYTHONCASEOK
Which environment variable is used to specify an alternative module search path in Python?
PYTHONPATH
Is Python a case-sensitive language?
true
What is the proper Python syntax to close a file?
close(fileObject)
What is the output of print str if str = 'Hello World!'?
Hello World!
What is the output of print str[2:5] if str = 'Hello World!'?
llo
What is the output of print str * 2 if str = 'Hello World!'?
Hello World!Hello World!
What is the output of print list if list = [ 'abcd', 786 , 2.23, 'john', 70.2 ]?
[ 'abcd', 786 , 2.23, 'john', 70.2 ]
What is the output of print list[1:3] if list = [ 'abcd', 786 , 2.23, 'john', 70.2 ]?
[786, 2.23]
What is the output of print list[2:] if list = [ 'abcd', 786 , 2.23, 'john', 70.2 ]?
[2.23, 'john', 70.2]
What is the Math Operator for Exponentiation in Ruby?
**
What is the output of the statement? puts "#{3 + 2}" in Ruby?
5
What is the correct syntax to interpret a line of code as a math operation in Ruby?
"#{}"
In Linux, where is text read or written in emacs?
Buffer
In Ruby, which of the following will output the first item in an array?
puts(cool_array)
What does EMACS stand for in Linux?
Editing Macros
In Linux, which symbol is used to reference a variable?
$
Which of the following is a way to concatenate strings in Ruby?
puts('test ' + 3)
What does sudo stand for in Linux?
superuser do
What is the correct way to create a constant with value 3 in Ruby?
Test = 3
In Linux, what are wildcard characters known as?
metacharacters
What is the term used for things that describe or characterize an object in Ruby?
Attributes
How does Ruby treat numbers and other primitive data types?
As objects
In Linux, what is the purpose of a comment line?
To explain the purpose of a command or function
What is the correct statement about Perl?
Perl stands for Practical Extraction and Report Language
Test your knowledge of Python programming basics with this CIS 109 final exam study guide. Explore the language's features, syntax, and programming methods. Review the correct answers to these multiple-choice questions and improve your understanding of Python.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free