0 - Python Programming
0 - Python Programming
• Click on the Download Python 3.xx.xx button near the top of the page
• 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 https://code.visualstudio.com/download
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,
• Go to https://colab.research.google.com/
Note: It is possible, and even customary to design the set of steps that are involved in performing a specific task before implementing the steps in a programming language. This concerns the design of algorithms. An
algorithm is a set of commands that are followed for a computer to perform a specific task.
Programming languages
A computer program is written using a computer programming language. So a computer programming language is simply a language/system of notations for writing computer programs.
Classification of programming languages Programming languages can be classified into low-level programming languages and high-level programming languages .
A low-level programming language is programming language is used to write computer programs that the target computer's processor can understand. Low-level languages are also known as machine language. The
drawback of machine code/language is that they are written specifically for a particular computer processor and will not work on any other type of computer processor.
Assembly language is also considered to be low-level. Here, some abstraction is possible and groups of machine code instructions can be invoked with a single command in assembly code. Assemblers are used to
convert assembly-language programs to machine language.
With the advent of assembly languages, the use of computers increased rapidly. However, programmers still had to use numerous instructions to accomplish even simple tasks.
High-level languages were developed in which single statements could accomplish substantial tasks. High-level language allow you to write instructions that look almost like everyday English and contain common
mathematical notations. It is important to note that high-level languages still needs to be converted to machine code for the computer to understand them. Depending on the language, there are two ways this is
achieved:
• Some languages use translator programs called compilers to convert high-level language code into machine language. Typically, for languages that use compilers, the translation to machine code is done
before the code is run. Such languages are referred to as compiled languages. Example of compiled languages include: Rust, C, C++, C#, Go, etc.
• Compiling a large high-level language program into machine language can take considerable computer time. Some languages support interpreters, which execute high-level language programs directly (on a line-
by-line basis). Interpreters avoid compilation delays but your code runs slower than compiled programs. Languages that support interpreters are called interpreted languages. Examples of interpreted languages
include: Python, R, JavaScript, etc.
• 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++.
Python is the dominant language in the field of artificial intelligence and machine learning. It is also very popular in other fields of computing, such as data analytics, data science, web development, and increasingly in
Python is the dominant language in the field of artificial intelligence and machine learning. It is also very popular in other fields of 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.
In [ ]: import this
Lecture Schedule
Tuesdays: 10AM-12PM
Thursdays: 11AM-12PM