Class 9 Computer Science: Introduction to Python

Answer key included

This worksheet assesses your understanding of the basic concepts, syntax, and applications of Python programming language. It covers fundamental elements like variables, data types, and operators.

Class 9CBSEComputer Sciencemedium

Your device's Print screen will open — choose "Save as PDF" to download.

Track practice: print a star chart

Class 9 · Computer Science
Name: ____________
  1. Q1.Which of the following is an interpreted programming language?
    • A.C++
    • B.Java
    • C.Python
    • D.Assembly Language
  2. Q2.Which character is used to denote a single-line comment in Python?
    • A.//
    • B./*
    • C.#
    • D.--
  3. Q3.The 'print()' function in Python is used to display output on the __________.
  4. Q4.What will be the output of the following Python code? print(2 + 3 * 4)
    • A.20
    • B.14
    • C.24
    • D.10

Preview — full sheet in the PDF

What's inside this workbook

This Class 9 Computer Science Practice contains 10 questions across 2 printable pages and includes a full answer key at medium difficulty. Aligned to the CBSE and NCERT syllabus.

How this worksheet helps your child

  • Builds confidence in core Computer Science concepts taught in Class 9 through repeated, varied practice.
  • Aligned to CBSE and NCERT — questions mirror the pattern children see in school tests and unit assessments.
  • Comes with an answer key so parents and students can self-check in minutes, without needing a teacher.
  • Pitched at medium level — use it for daily homework, weekend revision or quick exam warm-ups.

About this worksheet

Embark on an exciting journey into the world of programming with this Class 9 Computer Science practice worksheet, specifically designed for students following the CBSE curriculum. This resource is an excellent tool for understanding the foundational concepts of Python, a versatile and widely used programming language. As a beginner-friendly tool, Python is crucial for developing logical thinking and problem-solving skills, which are transferable to many aspects of life, not just coding. This worksheet is ideal for students who are just starting to learn Python or those looking to reinforce their knowledge of its core elements. It meticulously covers essential topics such as variables, different data types, and fundamental operators, ensuring a solid grasp of how to manipulate information within a program. Building a strong base in these areas is vital for progressing to more complex programming challenges, making this worksheet a valuable aid for both self-study and classroom practice.

What your child will learn

  • Practice identifying correct Python syntax for variables and data types.
  • Apply different Python operators to solve simple programming problems.
  • Recognise the purpose and function of various data types in Python.
  • Understand how to assign and reassign values to variables.
  • Demonstrate basic programming logic using Python's fundamental elements.

Understanding the concept

At its heart, computer programming is about giving instructions to a computer to perform specific tasks. Python is a popular language for writing these instructions because it's easy to read and understand, almost like writing in simple English. When we program, we often need to store information temporarily, and this is where 'variables' come in. Think of a variable as a named box where you can put a piece of data. For example, if you write `score = 100`, you've created a variable named 'score' and stored the number 100 in it. This '100' is a piece of 'data'. 'Data types' tell us what kind of information is stored in our variable boxes. Is it a number (like 10, 3.14)? Is it text (like 'Hello World')? Python automatically identifies if your data is an integer (whole number), a float (decimal number), or a string (text). Knowing the data type is important because different types of data can be manipulated in different ways. For instance, you can do math with numbers but not directly with text. Finally, 'operators' are the symbols that allow us to perform actions on our data. These include arithmetic operators like `+` (addition), `-` (subtraction), `*` (multiplication), and `/` (division), as well as comparison operators like `==` (equals) or `>` (greater than). Using these fundamental building blocks – variables, data types, and operators – we can create simple yet powerful instructions for the computer.

Tips for parents & teachers

  • Encourage your child to trace the output of the code snippets manually before running them on a computer.
  • Discuss real-world examples of how variables and data types are used (e.g., a game score, a name, a temperature reading).
  • Provide access to a Python interpreter (online or installed) so they can experiment with changing variable values and operators.
  • Review common Python syntax errors together to help your child develop debugging skills early on.
  • Ask your child to explain their reasoning for each answer to ensure conceptual understanding, not just memorisation.

Topics covered

pythonprogrammingcbseclass 9computer sciencevariablesdata typesoperators

How to use this worksheet at home

Open the print view and use your browser's Print dialog to print on regular A4 paper or save as a PDF. Hand the printed sheet to your child (Class 9) and set a relaxed time limit — 15 to 25 minutes works for most Computer Science worksheets. When they're done, open the "With answer key" view and let them self-mark question by question. Re-print as many times as you need; the file never expires and there's no download limit.

Frequently asked questions

Is this Computer Science worksheet really free?
Yes — every workbook on WorkbookWala is 100% free to download and print. No login, no email, no paywall. We're free for students, parents and teachers.
Is it aligned to the CBSE / NCERT syllabus?
Yes. All Class 9 worksheets are built around the CBSE and NCERT pattern so they map cleanly to what your child is studying in school.
Can I print this worksheet at home?
Yes. Click "Open print view" and use your browser's Print dialog to print on standard A4 paper, or save it as a PDF for later. The layout is designed to fit cleanly without scaling.
Does it include an answer key?
Yes — click "With answer key" to print a version with answers included, so parents and students can self-mark in minutes.

More Computer Science worksheets for Class 9

View all →
Something off with this worksheet? Report an issue
Print / Save as PDF