0% found this document useful (0 votes)
16 views2 pages

Python Basics and Installation Guide

Uploaded by

Emmanuel
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views2 pages

Python Basics and Installation Guide

Uploaded by

Emmanuel
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

0 - Welcome to System Programming

keyboard_arrow_down Installing Python on your computer


Option 1: Python interpreter & IDE
Go to [Link]

Click on the Download Python [Link] button near the top of the page

An installer will be downloaded to your computer

Run the installer and follow the prompts to install Python on your computer

It is recommended that you also install an IDE, preferably Microsoft Visual Studio Code.

To do so, go to [Link]

Download the appropriate installer for your operating system

Follow the prompts of the installer to set it up on your computer.

You are now ready to work with Python on your computer!

keyboard_arrow_down Option 2: Python's Scientific Computing package


Initial Anaconda/Spyder IDE installation/setup
Install Anaconda on your computer. Ensure Spyder and Jupyter is properly setup and working. You
can confirm by running the customary first program in a new programming language.

On Jupyter, photo_1.png Then click Run or press Ctrl+Enter

Congratulations, you're now a Python programmer! It is clear that there's significantly less code to
write to print out a statement in Python than in several other languages like C or C++!

On Spyder, photo_2.png

Then press Enter

Option 3: Python in the browser


You can also run Python in your browser on any device: personal computers, tablets, as well as
mobile phones

Go to [Link]

Login to with your Google account.

Click on New Notebook and start writing Python code!

keyboard_arrow_down The Basics of Python (Student's part)


At this point, we're ready to begin to study the basics of Python.

What is Python?
Coding style and language ethos

What is Python?
Python is a general-purpose programming language that supports many programming paradigms,
such as object-oriented programming, functional programming, and procedural programming.
Python is an interpreted language, which means that programs written in it do not need to be
compiled before running, as is common in C and C++.

Question: What are programming paradigms?

Python is the dominant language in the field of artificial intelligence and machine learning. It is also
very popular in other fields of scientific computing, such as data analytics, data science, web
development, and increasingly in embedded systems development (microcontrollers use a flavor of
the language known as MicroPython). A solid understanding of Python would be very beneficial to
an engineer looking to explore several exciting emerging fields in technology. The instructor
recommends that students continue striving to gain mastery of the language beyond the scope of
this course.

Coding style and langage ethos


It would interest anyone aspiring to master Python to be aware of two important documents that
touch at the very essence of what it eans to write good code in Python. The first and more
philosophical of these is can be found by running a command any python terminal. On a Python
terminal, type in:

import this

The second is a more technical document that every Python student must internalize, if they hope
to collaborate with other Python developers in the future. The document is the PEP 8 style guide.

Common questions

Powered by AI

'The Zen of Python' and PEP 8 play crucial roles in shaping Python's coding style and ethos. 'The Zen of Python,' accessed by typing `import this` in a Python terminal, provides guiding philosophical principles for writing Python code. PEP 8, on the other hand, is a technical style guide essential for maintaining consistency and readability, particularly in collaborative projects. Together, these documents ensure that Python code is not only functional but also elegant and maintainable .

Python's coding style ethos, embodied in 'The Zen of Python' and PEP 8, influences software development by promoting clarity, simplicity, and consistency. These principles help developers create more readable and maintainable code, fostering better collaboration and reducing errors, which are critical for successful software projects .

To install Python on a personal computer, visit https://python.org/downloads, click on the 'Download Python 3.xx.xx' button, and run the installer following the prompts. For a suitable IDE, download Visual Studio Code from https://code.visualstudio.com/download and set it up using the installer prompts .

A solid understanding of Python is beneficial for engineers because it is a leading language in fields like artificial intelligence, data science, and embedded systems. Python's simplicity and wide array of libraries and frameworks facilitate the development of scalable solutions and prototypes, making it indispensable for engineers aiming to leverage modern technological advancements .

Python's integration into embedded systems, particularly with variants like MicroPython, is significant as it brings the language's simplicity and power to resource-constrained environments. This allows the use of Python's rich ecosystem for developing applications on microcontrollers, facilitating rapid prototyping and development, and lowering the barrier to entry for developers focusing on the Internet of Things and embedded applications .

Programming paradigms are approaches to programming based on distinct concepts and structures. Python supports several paradigms, including object-oriented, functional, and procedural programming, allowing it to serve diverse programming needs and fostering its adoption in various technical fields .

Python can be run in a web browser using Google Colab by logging in with a Google account and creating a new notebook. This approach offers the advantage of being platform-independent, allowing code execution on any device, and enables easy sharing and collaboration among multiple users .

An IDE is important for Python development as it provides a comprehensive environment that integrates code writing, debugging, and execution features, facilitating efficient development. The document recommends using Microsoft Visual Studio Code as it is versatile and well-suited for Python programming .

Python's role in scientific computing and AI reflects its versatility due to its support for multiple paradigms like object-oriented, functional, and procedural programming. Its popularity is further enhanced by its dominant position in AI and machine learning, where it is the preferred language due to libraries and frameworks that simplify complex computations. Additionally, Python's ease of use extends to fields like data analytics, web development, and even embedded systems, demonstrating its flexibility and widespread adoption across various domains .

Python's interpreted nature allows it to run programs directly without the need for compilation, in contrast to compiled languages like C or C++. This attribute simplifies code execution and debugging, making Python more user-friendly and efficient for quick development, although it may trade off execution speed compared to compiled languages .

You might also like