This course is a beginner friendly course. In fact, it assumes that this is your step in world programming and python is your first language.
By the end of the course, you will be able to:
- Read and write basic to intermediate programs and scripts in python
- Debug code and correct mistakes to code
- Have a good understanding of the Python programming language
- Implement in your day-to-day activities
The course duration is approx. 24 contact hours, broken up into 8 weeks, 1 session per week with 3 hours per session.
We’ll be utilizing Microsoft Windows as our development platform and VS Code as our primary IDE (why? Because it’s free)
- Python syntax
- Variables and basic data types
- Input and output
- Control structures
- Functions and Modular programming
- Data structures (Lists, Tuples, Sets and Dictionary)
- Working with files
- Error handling
- Some Object-Oriented Programming concepts
“Python is an interpreted, object-oriented, high-level programming language with dynamic semantics.” --Python Essay
Python is a high-level programming language that has evolved from a general-purpose language to one of the most used languages for specialized industries including data analytics, machine learning and AI.
High-level vs Low-level programming languages
High-level Language: a programming language with strong abstraction from the details of the computer. (C, C++, Java, Python, etc.)
Low-level Language: provides little or no abstraction from a computer's instruction set architecture; commands or functions in the language are structurally like the processor's instructions. Generally, this refers to either machine code or assembly language. (Assembly Language and Machine code)
One thing that makes python so popular is its ability to support Rapid Application Development. Because of its dynamic typing and binding, taking an idea from concept to (more or less) working application is much faster when compared to other languages even for seasoned developers.
Python is a backend language. What this means is that you won’t see python on a website, but you can use it to support processes in the back end of the website. Other common uses cases include:
- Backend web servers
- DevOps and cloud engineering
- Machine learning
- Scripting and automation
It supports and encourages modularity and code reuse.
While most other languages are compiled, python is interpreted. (compilers translate the source-code while interpreter converts the code line by line)
- Python is simple to read and write
- Efficient and versatile
- Can be rapidly developed
- Automation
- Batteries included approach
Batteries Included
Python takes an approach of “batteries included” philosophy. What this means is that, with Python installed, you should have everything you need to build whatever you want.
This approach is achieved through Python's Modules and Packages (which we will cover in a later chapter), where Python out of the box comes with tons of pre-built modules such as os, sys, threading and random, just to name a few. Python also has externally provided modules such as NumPy and Seaborn to cover even more advanced operations. And of course, you can write your own as there is no way for the team behind Python to know exactly what you need for your specific project.
There are several IDEs available to write python programs including JetBrains, Jupyter Books, Python IDLE and VS Code.
Download Python for Windows from here
For this course we will be using VS Code from Microsoft, available here
The IDE is where you’d write and test your code. VS Code also supports the execution of your programs without having to leave the IDE. An IDE also allows you to manage your work much better.
However, an IDE is not mandatory to write python programs. You can download python from the official website and use the nano/vim/neovim in Linux or Notepad/Notepad++ in Windows to write programs. In fact, depending on your environment, you may find yourself using the simpler methods of nano or Notepad++ for writing scripts or programs on the fly.
When you download the installer for VS Code, simply follow the onscreen instructions, leaving everything as default and you’d be good to go.
There are 2 ways to run scripts:
- Directly from the command prompt / terminal
- From within the IDE