Introduction
We’re glad you’re here and want to explore the realm of possible by learning to code. This introductory paragraph gives you a bird's-eye view of programming languages and what constitutes a program.
While you go through the reading materials during this course, it’s highly recommended that you have your Thonny IDE (Integrated Development Environment) open to try out concepts on your own. You should also continuously test your learnings by completing the control exercises.
WHAT IS A PROGRAMMING LANGUAGE?
A programming language is a structured form of communication used to instruct computers on performing specific tasks. It consists of a combination of syntax — rules and structures for organizing code — and various elements such as data types, variables, operators, and control structures that define the logic and operations of a program.
Furthermore, programming languages often come equipped with libraries and frameworks, which are sets of pre-existing code that developers can utilize to streamline the development process and enhance functionality. Programming paradigms, like procedural, object-oriented (Python), or functional programming, dictate the style and approach used in writing software within a particular language.
Common programming languages, each with unique advantages and suited for different project requirements, include Python, Java, C++, JavaScript, etc. This Introductory Course is built around the Python programming language due to its beginner-friendly syntax and a broad range of use cases from full-stack development and Data Engineering to Machine Learning.
WHAT IS A PROGRAM?
A computer program is a set of instructions that a computer follows to perform specific tasks or solve problems. These instructions are written in a programming language, allowing humans to communicate with computers. Programming languages follow a hierarchy and range from high-level languages, which are more abstract and easier for humans to understand, such as Python, to low-level languages, like C, which are closer to the binary code - zeros and ones.
A computer program can be as simple as a set of instructions that prints out a message to the user or as complex as a software application with millions of lines of code and very complex logic, like an operating system or a web browser.
An example of a program in Python could be as simple as the following:
print("Hello World!") # This prints out "Hello World" in the console
CONCEPTS TO REMEMBER ABOUT PROGRAMS
- Source code is the set of instructions that a programmer writes in a given programming language, such as Python, to solve a task.
- Machine code is the lowest language level that computers directly understand without further translation. Machine code comprises binary digits (bits) - ones and zeros. The computer's CPU (Central Processing Unit) directly executes these binary instructions.
- Compiler is a program that translates source code written in a higher-level language into a low-level language, such as machine code. The process itself is known as compilation. The compiler checks the entire source code for errors and converts it into an executable program. This conversion process allows programmers to write in a human-readable language while still producing software that computers can execute efficiently. For example, C and C++ are compiled languages.
- Interpreter is also a program that translates code written in a higher-level language. However, instead of simultaneously translating the entire source code, an interpreter converts the code line by line into machine code during the program execution. This means that the program is executed incrementally. For example, Python and JavaScript are interpreted languages.
- Algorithm is a detailed set of instructions designed to perform a specific task or solve a desired problem. The algorithm you’ve designed to solve a particular problem can be implemented in any desired programming language. Algorithms outline the logic and sequence of steps to achieve a desired outcome.
INSTALLING THONNY
Thonny is an IDE for Python. Thonny comes with Python 3.7 built in, so just one simple installer is needed and you are ready to start programming.
You can find the step-by-step installation instructions for the Operating System of your choice below: