0% found this document useful (0 votes)
12 views10 pages

Python Programming Basics Explained

Python is a widely-used programming language known for its easy-to-read syntax that resembles natural English. It allows for integration into various projects and is essential for indicating code blocks through indentation. Variables in Python are created by assigning values, and they follow specific naming rules, including starting with a letter or underscore and being case-sensitive.

Uploaded by

ndombi037
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)
12 views10 pages

Python Programming Basics Explained

Python is a widely-used programming language known for its easy-to-read syntax that resembles natural English. It allows for integration into various projects and is essential for indicating code blocks through indentation. Variables in Python are created by assigning values, and they follow specific naming rules, including starting with a letter or underscore and being case-sensitive.

Uploaded by

ndombi037
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

PYTHON

WHAT IS PYTHON?

• Python is one of the most popular programming languages in the world.


• Its one of the languages that has the easiest syntax
• It provides user-friendly syntax because it resembles the natural English
language.
• It can be integrated into any project and used to solve advanced
problems.
APPLICATIONS OF PYTHON PROGRAMMING
PYTHON SYNTAX

• Python Indentation
• Indentation refers to the spaces at the beginning of a code line.
• Where in other programming languages the indentation in code is for
readability only, the indentation in Python is very important.
• Python uses indentation to indicate a block of code.
• Python Variables
• In Python, variables are created when you assign a value to it:
• Comments
• Comments can be used to explain Python code.
• Comments can be used to make the code more readable.
• Comments can be used to prevent execution when testing code.
• Python has commenting capability for the purpose of in-code
documentation.
• Comments start with a #, and Python will render the rest of the line as a
comment:
•Variables
• Variables are containers for storing data values.

• Creating Variables
• Python has no command for declaring a variable.
• A variable is created the moment you first assign a value to it.
• Variable Names
• A variable can have a short name (like x and y) or a more descriptive
name (age, car_name, total_volume).
• Rules for Python variables:
• A variable name must start with a letter or the underscore character
• A variable name cannot start with a number
• A variable name can only contain alpha-numeric characters and
underscores (A-z, 0-9, and _ )
• Variable names are case-sensitive (age, Age and AGE are three different
variables)

You might also like