Skip to content

Punjab (PTB) · Chapter test · Free

10th Class Computer Chapter 3 TestUNIT 03: INTRODUCTION TO PYTHON PROGRAMMING

30 marks · 40 minutes · 21 questions. Covers: UNIT 03: INTRODUCTION TO PYTHON PROGRAMMING.

Your school name

10th Class Computer Chapter 3 Test

10th Class · Computer · Punjab (PTB)

Name: ____________Roll No: ________Class/Section: ________Date: ________Total marks: 30Time: 40 minutes

Q1. Multiple choice questions (Attempt all · 10 × 1 = 10)

  1. In Python logical-and operator represented by:

    1. and

    2. or

    3. not

    4. &&

  2. Install software tool means:

    1. Configuring necessary tools

    2. Configuring necessary tools & libraries

    3. Configuring necessary libraries

    4. Configuring OS libraries

  3. In Python logical-or represented by:

    1. and

    2. &&

    3. or

    4. ||

  4. Which function converts string to integer?

  5. Popular Python IDE is:

    1. PyCharm

    2. VS Code

    3. IDLE

    4. All

  6. In Python, print( ) is a:

    1. Function

    2. Keyword

    3. Variable

    4. Library

  7. What should you do when installing Python to run it from the command line more easily?

    1. Uncheck "Add Python to PATH"

    2. Choose a different IDE

    3. Check "Add Python to PATH"

    4. Install only the IDE

  8. Google Colab is a:

    1. Search engine

    2. Cloud-based platform

    3. Web browser

    4. Python IDE

  9. Python use .......... translator:

    1. Assembler

    2. Compiler

    3. Interpreter

    4. All

  10. As compare to other languages Python is:

    1. More complex

    2. Easy to Debug

    3. Quickly to Execution

    4. Efficient Language

Q2. Short questions (Attempt any 6 of 8 · 6 × 2 = 12)

  1. If x = 10 and y = 5, what will be the output of x >= y and x <= y?

  2. If x = True and y = False, what will be the output of not(x) and not(y)?

  3. State any two advantages of using Google Colab.

  4. Discuss three basic data types in python.

  5. Define the comparison operator with an example.

  6. Differentiate between boolean and string variables in Python.

  7. Solve 8+342.

  8. What is the purpose of placing "f" before a string in Python?

Q3. Long questions (Attempt any 2 of 3 · 2 × 4 = 8)

  1. Describe the types of variables used in Python.

  2. Write a program in Python that will take a name from user and display greeting message to the given name.

  3. Solve the following expression: