ROWING MINDS TUTORIAL CENTER
AY: 2024 – 2025
4th Quarterly Assessment in Computer 6
BSU
Multiple Choices:
Read and analyze the following questions below. Choose and write the
letter of the correct answer on the line.
1. What is the latest version of Python mentioned in the module?
A. 2.7 B. 3.6 C. 3.7 D. 4.0
2. Python was created by:
A. Dennis Ritchie C. Guido van Rossum
B. Bjarne Stroustrup D. James Gosling
3. What is one of Python's key advantages?
A. It is difficult to learn. C. It has a simple and readable
B. It is not widely used. syntax.
D. It is platform-specific
4. Python is an example of a:
A. Low-level programming language C. Assembly language
B. High-level programming language D. Machine language
5. Python is used in the following fields EXCEPT:
A. Web development C. Game development
B. Data science D. Cooking
6. Which of the following is NOT a feature of Python?
A. It works on different platforms.
B. It requires complex syntax.
C. It allows for rapid prototyping.
D. It supports multiple programming paradigms.
7. What is CPython?
A. A tool used for debugging Python code
B. The reference implementation of Python written in C
C. A Python library for machine learning
D. A version of Python for mobile development
8. Which statement is TRUE about Python?
A. It does not support object-oriented programming.
B. It is case-sensitive.
C. It cannot connect to databases.
D. It can only be used for web development.
9. Which of the following is a correct way to print "Hello World" in Python?
A. print(Hello World) C. echo “Hello World”
B. print(“Hello World”) D. display(“Hello World”)
10. What happens when Python code has a syntax error?
A. The program runs but produces incorrect output.
B. The program runs normally.
C. The Python interpreter stops and displays an error message.
D. Python automatically fixes the syntax error.
11. Python is considered a:
A. Static language C. Weakly-typed language
B. Strongly-typed language D. Functional-only language
12. How does Python execute code?
A. It compiles the entire program C. It requires a separate linker.
first. D. It needs a hardware processor.
B. It executes line by line using an
interpreter.
13. In Python, which symbol is used to indicate a comment?
A. // B. # C. – D. %
14. What does it mean that Python is cross-platform?
A. It only runs on Windows.
B. It runs only on web browsers.
C. It can run on different operating systems.
D. It requires a specific device to run.
15. Which is an example of a Python syntax error?
A. print("Hello" "World") C. print(Hello World)
B. print("Hello", "World") D. print("Hello World")
16. The statement print("Hello", "Python") will output:
A. Hello,Python C. Hello Python
B. HelloPython D. "Hello Python"
17. Which of the following is NOT a use of Python?
A. Creating web applications C. Handling big data
B. Writing assembly code D. Performing complex mathematics
18. Python allows which of the following programming approaches?
A. Object-oriented C. Functional
B. Procedural D. All of the above
19. What will happen if you forget to close a quotation in a print statement?
A. The program will run but give unexpected output.
B. The interpreter will show a syntax error.
C. Python will automatically close the quotation.
D. The output will contain a missing quote.
20. Why is Python considered beginner-friendly?
A. It has a complex structure.
B. It requires advanced knowledge of C++.
C. It has a simple and readable syntax.
D. It does not have a large community.
21. What data type would you use for whole numbers?
A. float B. int C. str D. bool
22. Which Python data type is used for decimal or floating-point numbers?
A. int B. str C. float D. list
23. What is the data type of the value "Hello World"?
A. bool B. int C. str D. set
24. Which of the following is an example of a Boolean value?
A. 12 B. True C. "Python" D. 3.14
25. Which collection type in Python is ordered and mutable?
A. list B. tuple C. set D. dict
26. Which data type is an unordered collection of unique items?
A. list B. tuple C. set D. str
27. What type of data is stored in key-value pairs?
A. tuple B. dict C. set D. list
28. Which Python data type represents a value that indicates "no value"?
A. None B. bool C. int D. list
29. In Python, what symbol is used in complex numbers to represent the
imaginary unit?
A. i B. k C. j D. m
30. Which of the following statements about Python data types is TRUE?
A. Strings are mutable.
B. Lists cannot be changed once created.
C. Tuples allow adding elements.
D. Sets do not allow duplicate elements.
31. Jessa needs to store the names of her classmates in order. Which data
type should she use?
A. dict B. list C. tuple D. set
32. Carlo wants to save the coordinates (latitude and longitude) of a location,
and they should not change. Which data type fits best?
A. list B. tuple C. set D. float
33. A program needs to check if a user is a student (Yes or No). What data
type should the program use?
A. str B. int C. bool D. float
34. Ms. Reyes is creating a dictionary for students' names and their
corresponding grades. Which data type should she use?
A. set B. list C. dict D. tuple
35. John is counting the number of unique fruits he has collected. What data
type will automatically avoid counting duplicates?
A. list B. set C. dict D. str
36. What function is used to show output on the screen in Python?
A. input() B. print() C. display() D. echo()
37. Which is a valid variable name in Python?
A. 2value C. total_volume
B. full-name D. class
38. What rule is NOT correct for Python variable names?
A. Must start with a letter or C. Are case-sensitive
underscore D. Cannot be a keyword
B. Can contain hyphens
39. Which of the following uses Pascal Case?
A. studentAge C. student_age
B. StudentAge D. studentage
40. Which of the following uses Snake Case?
A. studentage C. studentAge
B. StudentAge D. student_age
41. Which statement is correct about variables in Python?
A. Variables are declared using var
B. Variables must be declared before use
C. Variables are created when you assign a value
D. Variables must be typed
42. What is the output of print("Hello, " + "world!")?
A. Hello world! C. Hello + world!
B. Hello, world! D. “Hello,” “world!”
43. Which variable name is invalid?
A. _value C. name@
B. Age2 D. totalVolume
44. What type of data can the print function display?
A. Only strings C. Strings, variables, and expressions
B. Only integers D. Only variables
45. Which formatting method is available in Python 3.6 and above?
A. % formatting C. format_string
B. f-string D. .display()
46. Jessa wants to display the text "Welcome to Python" on the screen. What
should she use?
A. display("Welcome to Python") C. print("Welcome to Python")
B. show("Welcome to Python") D. message("Welcome to Python")
47. Carlo wrote a variable name as student-age. His code does not run. What
is the problem?
A. He used capital letters
B. Variable names must start with an underscore
C. Hyphen is not allowed in variable names
D. He did not assign a value
48. Mica wants to make a variable readable with two words. She uses
TotalMarks. What case style is this?
A. Snake Case C. Camel Case
B. Pascal Case D. Upper Case
49. Liam wants to format his output with an f-string to include his score.
Which is correct?
A. print(f"Score = " + score) C. print(score = f"{score}")
B. print(f"Score = {score}") D. print("Score = score")
50. Andre used the variable name 1stPlace. The code caused an error. Why?
A. Variables can’t be capitalized C. He forgot the print function
B. Variable names can’t start with a D. Python doesn’t allow numbers in
number variables
51. May prints a message and wants to include a variable called name. Which
code is correct?
A. print("Hello" + name) C. print("Hello", name")
B. print(Hello + name) D. print(Hello, name)
52. Jenny named a variable Age, while her friend used age. What will happen
when they use these variables?
A. They will both work the same
B. Only Jenny’s will work
C. Python will combine both values
D. Python treats them as two different variables
53. Nathan wants to use Camel Case for a variable with multiple words.
Which is correct?
A. TotalMarks C. totalMarks
B. total_marks D. totalmarks
54. Claire used the print function like this: print("Math Grade:", grade). What
is the output if grade = 95?
A. Math Grade: grade C. Math Grade: 95
B. grade = 95 D. 95: Math Grade
55. Patrick wants to store his score in a variable and print it. Which is
correct?
A. score = "95" then print(score) C. "score" = 95
B. print = score(95) D. print(score = 95)
56. What is a correct syntax to output “Hello World in Python?
A. print(“Hello World”) C. p(“Hello World”)
B. echo ”Hello World” D. echo(“Hello World”)
57. How do you insert COMMENTS in Python code?
A. /*This is a comment*/ C. #This is a comment
B. //This is a comment D. //This is a comment//
58. Which one is NOT a legal variable name?
A. my-var B. my-var C. Myvar D. _myvar
59. How do you create a variable with the numeric value?
A. x = 5 C. both the A and B
B. x = int(5) D. none of the above
60. What is the correct file extension for Python files?
A. .py B. .pyth C. .pt D. .pyt
61. What is the correct syntax to output the type of a variable or object in Python?
A. print(type(x)) C. print(typeof x))
B. print(typeof(x)) D. print(typeOf(x))
62. What is the correct way to create a function in Python?
A. def myFunction(): C. create myFunction():
B. function myFunction(); D. function myFunction():
63. What is a correct syntax to return the first character in a string?
A. x = sub(“Hello”, 0, 1) C. x = “Hello”.sub(0, 1)
B. x = “Hello”[0] D. none of the above
64. Which method can be used to remove any whitespace from both the beginning and
the end of a string?
A. trim() B. strip() C. ptrim() D. len()
65. Which method can be used to return a string in upper case letters?
A. toUpperCase() C. uppercase()
B. upper() D. uppercase()
66. Which method can be used to replace parts of a string?
A. switch() C. replaceString()
B. replace() D. repl()
67. Which of these collections defines a LIST?
A. {"apple", "banana", "cherry"} C. ["apple", "banana", "cherry"]
B. ("apple", "banana", "cherry") D. {"name": "apple", "color": "green"}
68. Which of these collections defines a TUPLE?
A. {"name": "apple", "color": "green"} C. ["apple", "banana", "cherry"]
B. ("apple", "banana", "cherry") D. {"apple", "banana", "cherry"}
69. Which of these collections defines a SET?
A. ("apple", "banana", "cherry") C. {"apple", "banana", "cherry"}
B. ["apple", "banana", "cherry"] D. {"name": "apple", "color": "green"}
70. Which of these collections defines a DICTIONARY?
A. {"name": "apple", "color": "green"} C. ("apple", "banana", "cherry")
B. {"apple", "banana", "cherry"} D. ["apple", "banana", "cherry"]
71. Which collection is ordered, changeable, and allows duplicate members?
A. LIST B. SET
C. TUPLE D. DICTIONARY
72. Which collection does not allow duplicate members?
A. TUPLE C. SET
B. LIST D. DICTIONARY
73. How do you start writing a while loop in Python?
A. while x > y: C. x > y while {
B. while x > y { D. while (x > y)
74. How do you start writing a for loop in Python?
A. for x > y: C. for x in y:
B. for each x in y: D. none of the above
75. Which statement is used to stop a loop?
A. return B. exit C. stop D. break
Identification:
Identify the following statement below. Write your answer on the space
provided.
1. Guido van Rossum Who is the creator of the Python programming language?
2. CPython What is the default and most widely used implementation of Python?
3. 1991 In which year was Python first released?
4. print() What is the function used in Python to display output?
5. High-level What type of programming language is Python classified as (high-level,
low-level, or mid-level)?
6. print() is the built-in Python function used to display information on the screen.
7. A variable name that separates words using underscores is written in snake –case.
8. The method of writing variables where each word starts with a capital letter is called
PascalCase.
9. Variables that are containers for storing data values are known as Variables.
10. The method of formatting output in Python 3.6 and above using f"" is called f-
string.
Modified True or False:
Write TRUE if the statement is correct. If FALSE, change the underlined
word to make it correct.
1. ______________________Python data types are the classification of data items.
2. IMPLICITLY In Python, variables must be explicitly declared with a data type.
3. ______________________The int data type represents whole numbers without decimals.
4. ______________________The float data type is used for numbers with decimal points.
5. IMMUTABLE Strings (str) are mutable in Python.
6. ______________________The bool data type can only be True or False.
7. MUTABLE Lists in Python are immutable.
8. ______________________A tuple allows you to change its elements after creation.
9. UNIQUE Sets in Python allow duplicate elements.
10. ______________________Dictionaries (dict) store data in key-value pairs.
11. CREATE Python requires a command to declare a variable before assigning a
value.
12. ______________________The print function allows formatting outputs using format
specifiers and f-strings.
13. CASE – SENSITIVE Variable names in Python are not case-sensitive.
14. DISPLAYS STRINGS, VARIABLES AND EXPRESSIONS The print function can
only display strings, not variables or expressions.
15. ______________________total_volume is an example of a valid variable name in
Python.