Python Basics Worksheet – Class 7


📘 Section A: Multiple Choice Questions (MCQs)

1. Python is a:

A) Machine
B) Programming Language
C) Game
D) Browser
Answer: B


2. Who developed Python?

A) Bill Gates
B) Guido van Rossum
C) Elon Musk
D) Dennis Ritchie
Answer: B


3. Python is a:

A) Low-level language
B) High-level language
C) Assembly language
D) Machine code
Answer: B


4. Which symbol is used for comments in Python?

A) //
B) #
C) <!– –>
D) **
Answer: B


5. Which function is used to display output?

A) input()
B) print()
C) show()
D) display()
Answer: B


📘 Section B: Fill in the Blanks

  1. Python is a __________ language.
    Answer: high-level
  2. The extension of Python file is __________.
    Answer: .py
  3. __________ is used to take input from user.
    Answer: input()
  4. Python uses __________ indentation.
    Answer: proper / indentation-based
  5. A variable is used to store __________.
    Answer: data

📘 Section C: True or False

  1. Python is a case-sensitive language.
    Answer: True
  2. Python is only used for web development.
    Answer: False
  3. Indentation is important in Python.
    Answer: True
  4. print() is used for input.
    Answer: False
  5. Python is an object-oriented language.
    Answer: True

📘 Section D: Short Answer Questions

  1. What is Python?
    Answer: Python is a high-level, interpreted programming language used for web development, software, AI, and automation.

  1. What is a variable?
    Answer: A variable is a container used to store data values in Python.

  1. What is input() function?
    Answer: input() is used to take data from the user.

  1. What is print() function?
    Answer: print() is used to display output on the screen.

  1. Why indentation is important in Python?
    Answer: Indentation defines blocks of code and is necessary for proper execution.

📘 Section E: Coding Practice

21. Write a program to print your name

print("Your Name")

22. Write a program to add two numbers

a = 5
b = 10
print(a + b)

23. Write a program to take input from user

name = input("Enter your name: ")
print(name)

24. Write a program to print numbers 1 to 5

for i in range(1, 6):
print(i)

25. Write a program to check even or odd

num = int(input("Enter a number: "))

if num % 2 == 0:
print("Even")
else:
print("Odd")