WorksheetsFinal Coverage_Quiz 1
Total questions: 42
Worksheet time: 14mins
Please type your name:
Course Year and Section: (Ex. BSCS 1A)
What is Python?
A low-level programming language
A high-level programming language
A markup language
A database language
Who created Python?
Larry Wall
Guido van Rossum
James Gosling
Linus Torvalds
What is one of the benefits of Python as a programming language?
It is difficult to learn
Its syntax is complicated
It is not versatile
It is easy to use
What is one reason why Python is versatile?
It can only be used for small tasks
It is only used in one industry
It cannot run with other programming languages
It offers cross-platform functionality
Why is Python beginner-friendly?
Its syntax is easy to use and understand
It is a compiled programming language
It is designed to be complex and challenging for beginners
It requires advanced knowledge of programming concepts
Why are Python developer roles in high demand?
Because it is an unpopular programming language
Because it is only used by small companies
Because it is used by major companies like DropBox and Netflix
Because it is a difficult programming language to learn
What is one feature of Python's supportive community?
It doesn't have any online forums or resources for users
It only has a small community of users
It offers a network of robust community forums for users to discuss workflow and software development
It doesn't allow users to organize meetups around the world to build community and knowledge bases
What type of programming language is Python?
Compiled
Interpreted
Assembly
Machine
Why is it beneficial to use variables in Python?
They help make code more difficult to read
They provide a way to store and manipulate data within a program
They increase the likelihood of errors in our code
They reduce the readability and organization of our code
How is the data type of a variable determined in Python?
By the programmer declaring the data type
By the operating system of the computer
By the type of value assigned to the variable
By the interpreter used to run the program
What is the benefit of updating variables in Python?
It makes the code less flexible
It reduces the readability of the code
It provides a way to change the value of the variable throughout the course of the program
It increases the likelihood of errors in our code
What are integers?
Numbers with a decimal point
Numbers in exponential form
Whole numbers without a decimal point
A sequence of characters used to represent text
Which of the following are examples of floats?
3, 5, 10
3.14, -2.5, 20.8
2j, 3+2j
None of the above
How are complex numbers expressed in Python?
a+bj
a-bj
a+b
a-b
Why are numeric data types important?
They allow you to perform text processing tasks
They allow you to perform logical operations
They allow you to perform mathematical operations and calculations
They are used for input/output operations
What is a string?
A built-in data type in Python
A sequence of characters that represents whole numbers
A sequence of characters that represents text
A data type that has two possible values: True and False
What are some tasks that strings are used for?
Mathematical operations and calculations
Searching, replacing, and formatting text
Logical operations
Input/output operations
What is a Boolean data type?
A data type that represents text
A data type that represents whole numbers
A data type that has two possible values: True and False
A data type that represents complex numbers
How is the Boolean data type created in Python?
By using the keywords True and False
By using the keyword None
By using the keyword Boolean
By using the keyword Null
Why are Boolean data types important in programming?
They allow for mathematical operations and calculations
They allow for text processing tasks
They allow for logical operations and decision making
They are used for input/output operations
What control flow statements often use Boolean data types?
For loops
While loops
If-else statements
None of the above
What is a list in Python?
A data type used to store an ordered collection of elements
A data type used to store a collection of unique elements
A data type used to store text
A data type used to store integers and floats
What is a tuple in Python?
A data type used to store an ordered collection of elements
A data type used to store a collection of unique elements
A data type used to store text
A data type used to store integers and floats
Which of the following data types is mutable?
List
Tuple
String
Set
Which of the following data types is immutable?
List
Tuple
String
Set
What is a set in Python?
A data type used to store an ordered collection of elements
A data type used to store a collection of unique elements
A data type used to store text
A data type used to store integers and floats
What is the syntax for creating a list in Python?
{ }
( )
[ ]
< >
What is the syntax for creating a tuple in Python?
{ }
( )
[ ]
< >
What is the syntax for creating a set in Python?
{ }
( )
[ ]
< >
Which of the following is a characteristic of tuples in Python?
Tuples are mutable
Tuples can store duplicate values
Tuples are defined using square brackets
Tuples are immutable
Which of the following is a characteristic of sets in Python?
Sets can store duplicate values
Sets are ordered
Sets are defined using parentheses
Sets only contain unique elements
What arithmetic operator is used to add two operands?
*
/
-
%
What comparison operator returns True if both operands are not equal?
==
!=
<=
>=
What logical operator returns True if both operands are true?
and
or
not
Noe of the above
What assignment operator is used to assign a value to a variable?
=
-
/
*
What membership operator returns True if the specified value is found in the sequence?
not in
in
==
>
What arithmetic operator is used to raise the first operand to the power of the second operand?
+
-
*
**
What comparison operator returns True if the first operand is less than the second operand?
==
!=
<
>
What logical operator returns True if either of the operands is true?
and
or
not
None of the above
What assignment operator can be combined with one of the arithmetic operators to perform an arithmetic operation and assign the result to the variable?
+
/
*
=
