Your school name
10th Class Computer Chapter 4 Test10th Class · Computer · Punjab (PTB)
Q1. Multiple choice questions (Attempt all · 10 × 1 = 10)
Items inside a Python list are separated from each other using which punctuation?
What does the function random.randint(1, 10) do?
PDB is a:
if statement within an if statement:
Which built-in Python function is used to generate a sequence of numbers, often used with for loops?
Output of the following code: for i in range(3): print(i)
What is the purpose of the range( ) function?
Control Structure is essential because:
List can contain:
Which function is used to arrange items in a specific order?
Q2. Short questions (Attempt any 6 of 8 · 6 × 2 = 12)
What is the purpose of regression testing?
What is the purpose of the end parameter in print( )?
What are control structures? Name their main types.
Can a Python list contain items of different data types? Give an example.
Define a loop and the named types of loops used in Python.
Define a list in Python and write its basic syntax.
How can we access an element from the list?
Define testing in Python programming and named its types.
Q3. Long questions (Attempt any 2 of 3 · 2 × 4 = 8)
Write down the syntax to import the random library and generate a random number between 1 and 10.
What is control structure? Explain its importance.
How do Python libraries enhance programming efficiency? Provide an example.