CIC Hands On Python - s1&2
CIC Hands On Python - s1&2
Python
Prepared by : Abdelaziz Shaheen
TABLE OF CONTENTS
01 03
Overview Setting Up the
Environment
02 04
Time Complexity Variables
05 07
Operators & Python
Conditional Functions
06 08
Loops ?
● What is a Computer?
● What is an Operating System?
● What is an Application?
● Open-Source Vs Close-Source Software
● What is an Application?
● Open-Source Vs Close-Source Software
○ When you open an application, it runs inside the operating system until you close it.
Most of the time, you will have more than one application open at the same time,
which is known as multi-tasking.
Python frameworks like Django Libraries like NumPy, Pandas, Python's simplicity and ease of
and Flask simplify web Matplotlib, and SciPy make use make it a favorite for
development tasks. Python a popular choice for data automation, scripting, and task
analysis and visualization. scheduling.
Game Desktop
Development Cybersecurity Applications
Pygame, a set of Python Python is used in cybersecurity Libraries like Tkinter and PyQt
modules, is used for writing for tasks like penetration allow developers to create
video games and multimedia testing, vulnerability scanning, cross-platform desktop
applications. and creating security tools. applications.
- - -
Theta Middle - -
O(log n)
Good
Big O O(n)
Types of Complexities Fair
O(n log n)
Bad
Big O
Types of Complexities
O(1)
O(n)
O(n^2)
By counting the number of primitive operations performed by the algorithm on a given input size.
echo text > filename.txt To Create text file that includes the written
text
cls Clears all the commands in the cmd
Dictionary None
Variables
Mapping Boolean& None
Numeric Types Sequence Types
Types Type
• Variable Names: Variable names can contain letters (both uppercase and lowercase), digits, and
underscores (_). However, they cannot start with a digit. Variable names are case-sensitive (age
and Age would be different variables).
• Constants: While Python doesn't have constants in the strict sense, variables with all capital
letters (e.g., PI = 3.14) are often used to indicate that their values should not be changed.
• Multiple Assignment: You can assign values to multiple variables in a single line:
a, b, c = 1, 2, 3
• Variable Naming Convention: It is a common convention in Python to use snake_case for
variable names (e.g., user_age, total_count) to enhance readability.
• Deleting Variables: You can delete a variable using the del statement:
del age
Python Uses Single Quotes ‘ ’ and double Quotes “ ” but it’s preferred to use the single one
Escaping
Operator Meaning
>= G or equal
<= S or equal
== Is equal
!= Is not equal
1. “@gmail.com”.
2. You need to make all the letters
lowercase.
3. The email can not start with a
number. *