PYTHON SELF-STUDY SERIES: Lesson 1. Introduction

68

The series of articles provides simple instructions on the Python programming language, which is popular for its simplicity, logic in structure, and is especially close to the fields of natural science and engineering. The purpose of this lecture series is to provide general IT students with basic understanding and skills in programming and the Python language.

I. Introduction to the Python programming language from a personal perspective

The history of the Python language is everywhere. This is a programming language invented by Guido van Rossum in 1991. After that, the language was quickly developed and popularized because of its superiority: easy to read, easy to learn and easy to remember.1. For today's science and engineering, Python increasingly proves its outstanding position in important contributions to the development of these fields. Python is a general-purpose programming language, which means it can be used for many types of applications. Engineering students can leverage Python for tasks like data analysis, simulation, scientific computing, web development, automation, etc. Its versatility makes it a go-to tool. valuable for various engineering disciplines. For a more general overview of Python, readers can refer to2. The contents of this section can be found in section V below.

II. CTTT students can learn Python

Because of its simplicity, ease of learning, easy to remember, and especially applicable in many different fields, Python is a practical language, and truly necessary for students of natural sciences and engineering. , economics,... equip yourself and develop professional career skills. Because of its ease of learning, acquiring knowledge of this tool becomes extremely simple. In particular, with the help of internet search engines and AI tools like chatGPT, self-learning Python becomes easy and effective.

For CTTT students of the International Faculty, you are introduced to programming knowledge through many basic and specialized arithmetic, such as High-level programming languages, Applied Mathematics,... These are learning opportunities. Great practice for you to practice and improve your skills, programming thinking, and required career skills.

III. Install Python

Can be installed Python combined with a Jupyter Notebook (Python code editor and many other programming languages) through a single installation of the software Anaconda. Some applications allow users to write code and execute it directly through an internet connection without needing to be installed on their personal computer, such as google.colab.

IV. Overview of Python libraries

A library is a collection of pre-compiled code that can be used later in the program for some specific, well-defined operations. In addition to precompiled codes, libraries can contain documentation, configuration data, message templates, classes and values, etc. In Python, popular libraries include:

the: Interaction with the operating system.
sys: Access system-specific parameters and functions.
math: Perform mathematical calculations.
datetime: Date and time manipulation.
random: Generate random numbers.
NumPy: Supports large multidimensional arrays and matrices, and provides mathematical functions to manipulate them.
pandas: Manipulate and analyze structured data with String and DataFrame data structures.
matplotlib: Create static, animated, and interactive visualizations.
Requests: Make HTTP requests simply and elegantly.
Scipy: Perform scientific and engineering calculations, including numerical integration and optimization.
Scikit-Learn: Implement machine learning algorithms for data mining and data analysis.
TensorFlow: Build and deploy machine learning and deep learning models.
Hard: Simplifies the process of building and training neural networks.
Flask: Develop lightweight web applications and APIs.
Django: Create full-stack web applications with built-in features for rapid development.
BeautifulSoup: Parses HTML and XML documents for web scraping.
S: Automates web browsing for web testing and scanning.
Pygame: Developing video games and multimedia applications.
SQLAlchemy: Interact with databases using SQL and Object Relational Mapping (ORM) toolsets.
PyTorch: Build deep learning models and perform tensor calculations.

V. More about the application areas of Python programming language

  1. Data science and data analysis
    Data analysis: Python is widely used for data processing, analysis, and visualization. Libraries like Pandas, NumPy, and Matplotlib provide powerful tools for processing large data sets and creating insightful visualizations.
    Machine Learning: With libraries like Scikit-learn, TensorFlow, and PyTorch, Python has become a popular language for building and deploying machine learning models.
    Statistical analysis: Python enables powerful statistical analysis and hypothesis testing, which are important for making data-driven decisions.
    Impact: Python's role in data science has revolutionized the way businesses approach decision making, providing deeper insights and predictive capabilities to drive strategic initiatives.
  1. Web development
    Backend development: Frameworks like Django and Flask allow developers to build powerful, scalable web applications quickly.
    APIs: Python is often used to develop RESTful APIs, which support communication between different software systems.
    Content Management: Many content management systems (CMS) are built using Python, allowing for easy web content management and deployment.
    Impact: The simplicity of Python and the power of its frameworks have helped streamline web development processes, allowing rapid prototyping and deployment of web applications.
  2. Automation and scripting
    Automate tasks: Python scripts automate repetitive tasks, such as file manipulation, data entry, and system administration, improving productivity and reducing human error.
    Web scraping: Libraries like BeautifulSoup and Scrapy allow developers to extract data from web pages, facilitating data collection for various applications.
    Impact: Automation through Python has transformed workflows across industries, allowing for more efficient and error-free operations.
  3. Artificial intelligence and machine learning
    AI development: Python's ecosystem includes powerful libraries for AI development, such as Keras, TensorFlow, and PyTorch, which support neural networks, natural language processing, and deep learning.
    Reinforcement learning: Python is used to develop and test reinforcement learning algorithms, driving advances in autonomous systems and robotics.
    Impact: Python has accelerated advances in AI, allowing researchers and developers to create complex models and algorithms that drive innovation in automation, healthcare, finance, etc
  4. Scientific calculation
    Numerical calculation: Libraries such as NumPy and SciPy provide high-performance numerical computing tools essential for scientific research.
    Simulation and modeling: Python is used to simulate complex systems and model scientific phenomena, supporting research and discovery across many different scientific fields.
    Impact: Python's role in scientific computing provides access to powerful computational tools, allowing scientists and researchers to perform advanced analyzes and simulations.
  5. Education and educate
    Programming overview: Python's simplicity makes it an ideal language for teaching basic programming principles to beginners.
    Interactive learning: Platforms like Jupyter Notebooks provide interactive environments for learning and experimentation, making Python a popular choice in educational environments.
    Impact: Python's accessibility and ease of learning have made it a cornerstone of computer science education, inspiring a new generation of programmers and data scientists.
  6. Internet of Things (IoT)
    Device programming: Python is used to program IoT devices, allowing the creation of smart applications and connected systems.
    Collect data: Python scripts collect and process data from IoT sensors, facilitating real-time monitoring and analysis.
    Impact: Python's flexibility and integration have fueled the growth of IoT, enabling the development of innovative smart solutions that enhance connectivity and automation.
  7. Network security
    Penetration testing: Python tools like Scapy and Metasploit are used for network scanning, vulnerability assessment, and penetration testing.
    Automate security: Python automates security tasks, such as log analysis and threat detection, improving the efficiency of cybersecurity operations.
    Impact: Python's role in cybersecurity has enhanced defenses against cyber threats, providing powerful tools for security professionals to protect systems and data.

BECAUSE. Organization of the Lecture Series

The lecture series is organized according to the contents of the Linear Algebra and Calculus modules taught to students majoring in Electrical and Electronics Engineering and Mechanical Engineering. The organization of the lectures in the series (with links) is as follows:

Lesson 1. Introduction

Lesson 2. Variables and Functions

  1. https://en.wikipedia.org/wiki/Python_(programming_language) ↩︎
  2. https://www.python.org/about/ ↩︎