0% found this document useful (0 votes)
2 views9 pages

Grade 10 Python Programming Basics

Python is a widely-used programming language known for its readability and versatility in web development, software development, and mathematics. It is an interpreted language where code is written in .py files and executed through a Python interpreter. Key concepts include the print() function, comments, and variable creation without explicit declaration.

Uploaded by

rawaanheshaam172
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views9 pages

Grade 10 Python Programming Basics

Python is a widely-used programming language known for its readability and versatility in web development, software development, and mathematics. It is an interpreted language where code is written in .py files and executed through a Python interpreter. Key concepts include the print() function, comments, and variable creation without explicit declaration.

Uploaded by

rawaanheshaam172
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

INTRODUCTION TO

PYTHON:
Grade 10
WHAT IS PYTHON ?
• Python is a popular programming language, was designed for
readability, and has some similarities to the English language
• It is used for:
• web development (server-side),
• software development
• Mathematics and system scripting
PYTHON QUICKSTART

• Python is an interpreted programming language, this means that


as a developer you write Python (.py) files in a text editor and
then put those files into the python interpreter to be executed

• Let's write our first Python file, called [Link], which can be
done in any text editor
PYTHON FUNCTIONS:
The print() Function prints the specified message to the screen, or other standard
output device
Example:
-print("Hello, World!")
The output should be: Hello, World!
A QUICK QUESTION!?
• What is the correct file extension for Python files?
I. .pp
II. .pt
III. .py
PYTHON COMMENTS

• Comments can be used to explain Python code, make the code more
readable and prevent execution when testing code
• Comments starts with a #, and Python will ignore them:
• To add a multiline comment, you could insert a # for each line:
• #This is a comment
#written in
#more than just one line
print("Hello, World!")
EXERCISE
• Which character is used to define a Python comment?
I. “
II. //
III. #
IV. /*
CREATING VARIABLES

• Python has no command for declaring a variable.


• A variable is created the moment you first assign a value to it
• Example:
x=5
y = "John"
print(x)
print(y)
EXERCISE
• What is a correct way to declare a Python variable?
I. Var x =5
II. # x = 5
III. X = 5
IV. / x = 5

You might also like