[go: up one dir, main page]

0% found this document useful (0 votes)
20 views15 pages

1 Intro

Python is a versatile programming language created in the late 1980s. It can be used for tasks like web development, data analysis, artificial intelligence, and more. Python code uses indentation rather than brackets to structure blocks of code and achieve readability. The language supports basic data types like integers, floats, booleans, strings and more. It also has various operators for arithmetic, assignment, comparison, and logical operations that follow precedence rules.

Uploaded by

alaa abu madi
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)
20 views15 pages

1 Intro

Python is a versatile programming language created in the late 1980s. It can be used for tasks like web development, data analysis, artificial intelligence, and more. Python code uses indentation rather than brackets to structure blocks of code and achieve readability. The language supports basic data types like integers, floats, booleans, strings and more. It also has various operators for arithmetic, assignment, comparison, and logical operations that follow precedence rules.

Uploaded by

alaa abu madi
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
You are on page 1/ 15

Introduction to

Python: history and statistics


• Python is a high-level programming
language created by Guido van Rossum in
the late 1980s.
• Python is an interpreted language, which
means that it is executed line by line.
• Python is a versatile language used for a
variety of tasks such as web development,
data analysis, artificial intelligence, and
more.
• Python is very popular language.

2
Installing Python
• Python can be installed on Windows, Mac, and Linux operating systems.
• Download the latest version of Python from the official website:
https://www.python.org/downloads/
• Latest version is python 3.11
• Install Python by following the prompts in the installation wizard.
• You will need an IDE
• What is an IDE?
• Use Pycharm community version, you can download it from:
https://www.jetbrains.com/pycharm/download

3
Python is easy to lean
• Python is one of the easiest programming languages to learn
• You achieve more in Python per-statement than most
languages.
• The print() function is used to output text to the screen.
• Example: print("Hello, World!")
• Output: Hello, World!
• Python has its own style to make sure you code is clean and
readable
4
Programming language Syntax
• Just like any spoken language, programming languages have their own
syntax.
• What is a Syntax?
• A Set of words, symboles, and apperviations
• A Set of rules that govern the use of the the above to create valid sentances.
(Grammar)
• For a Python program to run correctly, it must have a valid syntax

5
Execute a Python code
• Python code can be executed directly in the command line
• If you have installed python, you can directly write and execute code
on the command line
• This way is useful to try and test small code portions

6
Execute a Python code
• You can execute a python file using the command line
• This way is more suitable for running store programs

7
Python code indentation
• Code indentation is used by Python to visually and syntactically
structure the program.
• A code indentation is the spaces at the beginning of the line code, it
can take one of the two styles:
• Tab
• 4 spaces

• You should not mix between the two indentation styles.

8
Python Data Types
• Data Types are basic
building blocks of a
program,
• They are used to
represent and store data
• Python has the following
built-in types:

9
Python Data Types

10
Python Operators: Arithmetic

11
Python Operators: Assignment

12
Python Operators: Comparison

13
Python Operators: Logical

14
Python Operators: Precendence Rules

15

You might also like