Okay, I'll provide concise and easy-to-understand answers to the 2-mark questions from the
provided Python exam papers.
November 2022
1. What are Variables?Variables are names used to store data values in a program. They
act like containers for information.
2. Define [Link] are combinations of values, variables, and operators
that result in a value. For example, 2 + 3 is an expression.
3. State the function of eval().The eval() function executes a string as a Python
expression. It can calculate a value from a string.
4. What are modules?Modules are files containing Python code that can be used in other
programs. They provide reusable code.
5. Define File.A file is a named location on a storage device used to store data permanently.
6. List out any two decision flow control statements in [Link] decision flow control
statements in Python are if and if-else. They control which code runs based on conditions.
7. How to make a two-dimensional list in python?A two-dimensional list is created as a
list of lists, where each inner list represents a row.
8. Write a syntax of the while loop [Link] syntax of a while loop is: while condition:
# Code to execute.
9. What is the random module?The random module provides functions to generate
random numbers.
10. Why is the dictionary used in python?A dictionary is used to store data in key-value
pairs, allowing for efficient data retrieval.
11. What are lists?Lists are ordered collections of data items. They can store multiple values
in one variable.
12. Write a note on character [Link] encoding is a method to convert
characters into a digital format so they can be stored and processed by computers.
April 2023
1. Write a short note on [Link] are blueprints for creating objects, defining their
properties and behaviors.
2. Define [Link] are names that store data values. They hold information that
can change during program execution.
3. Write a syntax of the print() [Link] syntax of the print() function is: print(item1,
item2, ...).
4. How to pass a parameter in python? Give an [Link] are passed inside
the parentheses of a function call. Example: def my_function(param1): print(param1);
my_function("Hello")
5. Briefly explain formatted [Link] output is a way to present data in a specific,
readable layout using functions or string formatting.
6. Write a syntax of the Break statement with an [Link] syntax is break;. It's used
to exit a loop. Example: for i in range(10): if i == 5: break; print(i)
7. What is the use of a dimensional list in python?Dimensional lists (like 2D lists) are
used to represent data in a table-like format (rows and columns).
8. Write a short note on the function of the for... [Link] for loop iterates over a
sequence (like a list or range), executing a block of code for each item.
9. How to use the random module in [Link] random module is used by importing it
(import random) and then calling its functions (e.g., [Link]()).
10. What is the use of the dictionary in python?Dictionaries store data in key-value pairs
for efficient lookup.
11. Define [Link] expression is a combination of values, variables, and operators
that evaluates to a single value.
12. Briefly explain data types in [Link] types classify data (e.g., integer, string, float)
and determine the operations that can be performed on it.
November 2023
1. What are lists?Lists are ordered, changeable sequences of elements. They can store
multiple items.
2. Write any two data types in [Link] data types in Python are: Integer (int) and
String (str).
3. List out any two built-in [Link] built-in functions are print() and len().
4. Write a short note on the user-defined function.A user-defined function is a function
created by the programmer to perform a specific task.
5. What do you mean by expression?An expression is a combination of values, variables,
and operators that results in a value.
6. Explain the function of the nested if...else statement.A nested if...else statement is an
if or else statement inside another if or else statement, allowing for more complex
condition checking.
7. How to create a two-dimensional statement in python?This question seems to have a
slight error. It likely meant "two-dimensional list". A 2D list is created by having a list
where each element is itself a list.
8. What is the random module?The random module provides functions for generating
random numbers.
9. Why are dictionaries used in python?Dictionaries are used to store data in key-value
pairs, which allows for quick retrieval of values using their associated keys.
10. Define [Link] are names that refer to memory locations where data can be
stored.
11. Write any two different operators in [Link] different operators in Python are the
addition operator (+) and the assignment operator (=).
12. Write a note on Namespace.A Namespace is a naming system to ensure that all names
in a program are unique and avoid conflicts.