ICT M1 Lesson 6 & 7
ICT M1 Lesson 6 & 7
Sixth Lesson
Principles of python
Definition of python
Python Features
Features
Open source ----- Free and open source
Easy to use ------one of the easiest programming language for beginners because its
simple and organized uses English words.
Libraries-----python uses many libraries they are pre-built codes and functions that
help programmers perform specific tasks without having to write codes from scratch,
libraries are a powerful tool that increases the efficiency and effectiveness of
programming using Python, as they provide ready-made solutions to many common
problems or requirements. such as
Python libraries
2
Questions
Put ( √ ) or ( X )
1. Python is a free and open-source language, which does not allow anyone to develop
it.
2. It is not permissible to create applications and websites in Python.
3. Python uses data science and machine learning.
4. Python is an interpreted language because it translates programming codes line by
line.
5. Python is used in developing web applications, data science, artificial intelligence,
machine learning, and game programming.
6. Python can be integrated with other languages such as C, C++, and Java. ( )
7. One of the disadvantages of Python is the lack of libraries that you can use.
8. Python is one of the most difficult programming languages.
9. NumPy: A library used in data science, statistics, and artificial intelligence.
10. Pandas: A library for analyzing and processing data.
Download Python from the official website and arrange the following steps in the
correct order.
4- After downloading, install the program on your device and follow the instructions.
5- Choose "Downloads"
3
Date / / .
Seventh Lesson
Variables in python
A reserved place in memory to store and save a specific value, where the value can change
example: Taher= 20
Where you can change the value of the variable while dealing with the program
immediately during the execution of the program.
3. Reserved words may not be used in Python because they express specific values that
the program understands
Example:
(False) A reserved word within the program is a word that indicates a reserved value
(logical value).
Note : When writing a variable name, you must take into account placing the variable
names in upper and lowercase letters
In the previous example, the variable names refer to four variables and not one variable.
4
Types of variables in Python
1. Numbers: Used to store numerical values such as integers (int) and decimals (float).
Integer variables: X= 5
(int) Y= 10
Decimal variables: Z= 5.25
(float) A= 8.32
2. Strings: Used to store texts such as names and addresses.
The print function ( ) in Python is one of the most commonly used functions, used to
display text or values on the output screen.
It can be used to display text, variables, or even the results of mathematical operations.
Note: The interactive Python interface is installed when you install the Python language,
and there is no need to download it, unlike a text editor that must be downloaded from the
Internet, such as Visual Studio and PyCharm.
5
Questions
Put ( √ ) or ( X )
1. The function ..... is used to display texts or values on the output screen
2. The text value of the variable is placed between the signs .....
3.To display texts, variables, or even the results of mathematical operations, we use
the function .....
4. To know the type of the variable statement, we use the function .....