Your school name
10th Class Computer 2nd Quarter Book Paper10th Class · Computer · Punjab (PTB)
Q1. Multiple choice questions (Attempt all · 12 × 1 = 12)
In Python logical-and operator represented by:
Items inside a Python list are separated from each other using which punctuation?
Install software tool means:
What does the function random.randint(1, 10) do?
In Python logical-or represented by:
PDB is a:
Which function converts string to integer?
if statement within an if statement:
Popular Python IDE is:
Which built-in Python function is used to generate a sequence of numbers, often used with for loops?
In Python, print( ) is a:
Output of the following code: for i in range(3): print(i)
Q2. Short questions (Attempt any 8 of 12 · 8 × 2 = 16)
If x = 10 and y = 5, what will be the output of x >= y and x <= y?
What is the purpose of regression testing?
If x = True and y = False, what will be the output of not(x) and not(y)?
What is the purpose of the end parameter in print( )?
State any two advantages of using Google Colab.
What are control structures? Name their main types.
Discuss three basic data types in python.
Can a Python list contain items of different data types? Give an example.
Define the comparison operator with an example.
Define a loop and the named types of loops used in Python.
Differentiate between boolean and string variables in Python.
Define a list in Python and write its basic syntax.
Q3. Long questions (Attempt any 3 of 4 · 3 × 4 = 12)
Describe the types of variables used in Python.
Write down the syntax to import the random library and generate a random number between 1 and 10.
Write a program in Python that will take a name from user and display greeting message to the given name.
What is control structure? Explain its importance.