1️⃣ What is Python?
(5 Marks)
Python is a popular and high-level programming language. It was created by Guido van Rossum
and released in 1991. It is easy to learn and widely used in different fields of programming.
Python is used for:
Web development (server-side)
Software development
Mathematics and calculations
System scripting
Because of its simple syntax and wide applications, Python has become one of the most popular
programming languages in the world.
2️⃣ What Can Python Do? (5 Marks)
Python is a powerful programming language that can perform many important tasks.
Python can be used on a server to create web applications.
It can be used alongside software to create workflows.
Python can connect to database systems. It can also read and modify files.
It can handle big data and perform complex mathematical calculations.
Python can be used for rapid prototyping and also for production-ready software development.
So, Python is useful for both small projects and large-scale applications.
3️⃣ Why Python is Popular? (5 Marks)
Python is popular for several important reasons.
First, Python works on different platforms such as Windows, Mac, Linux, and Raspberry Pi.
Second, Python has a simple syntax similar to the English language, which makes it easy to
read and understand.
Third, Python allows programmers to write programs using fewer lines compared to many other
programming languages.
Fourth, Python runs on an interpreter system. This means code can be executed as soon as it is
written, which makes testing and prototyping very fast.
Finally, Python supports procedural, object-oriented, and functional programming styles.
Because of these features, Python is widely used by beginners and professionals.
Python Syntax Compared to Other Programming Languages (5 Marks)
1. Use of New Lines: Python uses new lines to complete a command. In many other programming
languages like C or Java, semicolons (;) are used to end a statement. This makes Python code look
cleaner and less crowded.
2. Use of Indentation: Python uses indentation (spaces) to define blocks of code such as loops,
functions, and classes. Indentation is compulsory in Python. On the other hand, many programming
languages use curly brackets { } to define code blocks. Because of indentation, Python code looks
well-organized and easy to read.
3. Simple and English-like Syntax: Python syntax is similar to the English language and
influenced by mathematics. This makes it easier for beginners to learn and understand compared to
many other languages
Python Indentation
Indentation refers to the spaces at the beginning of a code line. In many other programming
languages, indentation is used only to make the code more readable. It is not necessary for the
program to run.
But in Python, indentation is very important. Python uses indentation to define a block of code,
such as in loops, functions, and conditional statements.
If the indentation is incorrect, the program will produce an error. Therefore, indentation is a
required part of Python syntax.
Statements
A computer program is a list of instructions that are executed by a computer. In a programming
language, these instructions are called statements.
Each statement tells the computer to perform a specific action, such as displaying output, taking
input, performing calculations, or making decisions. Therefore, statements are the basic building
blocks of any program