Skip to content

Federal (FBISE) · Chapter test · Free

1st Year Computer Chapter 3 Test3. Programming Fundamentals

30 marks · 40 minutes · 21 questions. Covers: 3. Programming Fundamentals.

Your school name

1st Year Computer Chapter 3 Test

1st Year · Computer · Federal (FBISE)

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

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

  1. In online IDEs, we can write and run out code without ________ in our computer.
    1. Installing
    2. Creating
    3. Performing
    4. Detecting
  2. What will the following program do : for i in range (10,0,-1): print ('iteration no-',i)
    1. It will give error
    2. It will run 9 times
    3. It will run 10 times
    4. It will run 11 times
  3. The input () function treats the entered data as a set of _______.
    1. Digits
    2. Characters
    3. Symbols
    4. Arithmetic operators
  4. Python was first introduced in _________.
    1. 1990
    2. 1994
    3. 1992
    4. 2022
  5. _______ provide basic variable types as str, integer, float, etc.
    1. Print job
    2. Page break
    3. Python
    4. Procedure
  6. '**' is used to represent __________.
    1. Division
    2. Floor division
    3. Multiplication
    4. Exponentiation
  7. We can design 2D geometrical shapes in Python, using _________.
    1. Operators
    2. Iterations
    3. Variables
    4. Turtle Graphics
  8. If the program is unable to execute the next instruction, the program will reach the state of ________.
    1. Hang
    2. Reboot
    3. Shutdow
    4. Sleep
  9. Operator != is used for __________.
    1. Equal
    2. Logical AND
    3. Not equal
    4. Logical OR
  10. A REPL means ____________.
    1. Read-Enter-Print-Loop
    2. Read-Exit-Print-Loop
    3. Read-Eval-Print-Loop
    4. Read-Evolve-Print-Loop

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

  1. How do you swap values of two variables in Python using a temporary variable?
  2. What is a logical bug in programming?
  3. What are some basic functions available for lists in Python?
  4. How do you convert user input to an integer in Python?
  5. What is iteration in programming?
  6. What is operator precedence in Python?
  7. How does Python support machine learning and data analytics?
  8. How do you get the current date and time in Python?

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

  1. Explain the applications of python in different business and Technical domains.
  2. What are the basic functions that list provides. Elaborate each them with an example.
  3. Write a program for a Dice Rolling Race game for 2 players. Alternatively, generate a random number of each player. If the player rows out to be 6, then the player gets another. Rolls of every iteration is summed up to the previous rolls. The player who reaches 100 first, wins.