Overview In this tutorial you will learn basics of programming in Python. The key benefits of this tutorial: Learn it step-by-step Every step has a theory section where I provide: ...
Learn Python by doing. Create simple calculator - Introduction.
Step 1 - Install and configure tools
Step 1.1: Install tools To get started we need to install following software: Python itself - allows us to run python programs. VS Code - allows us to easily write code. Install Python: In...
Step 2 - Learn how to print data in Terminal
Theory In this tutorial we’re going to use the terminal in order to interact with our program. You should be already familiar with Graphical User Interface (GUI) as you see it everywhere in the mo...
Step 3 - Learn how to enter data in Terminal
Theory Since we’re going to create a calculator, we somehow need to interact with a user - ask them to enter numbers, and then provide a result. Let’s now learn how to enter data in the terminal ...
Step 4 - Learn Variables in Python
Theory What is the variable? Objects (text, numbers, complex data structures) with data are stored inside computer memory. In the real world we use a post address when we need to visit some p...
Step 5 - Learn how to merge Strings
Theory Imagine you have a box of puzzle pieces, and each piece contains a part of a picture. To see the complete picture, you need to join all the pieces together. Similarly, when you merge string...
Step 6 - Learn how to do Math in Python.
Theory Python provides a good number of tools which will help you to solve mathematical problems, perform calculations, and analyze data. The perfect use case is this tutorial where we create a c...
Step 7.1 - Learn Conditional Statements - the if statement
Theory: Overview The Conditional Statements together with boolean operators and comparison operators allow us to define the program flow. This topic is quite big and there are lots of details to c...
Step 7.2 - Learn Conditional Statements - the else statement
Theory: the else statement We learned, that the if statement must always result in True and only then Python can execute actions suitable for that event. But, what if we want to execute another se...
Step 7.3 - Learn Conditional Statements - the elif statement
Theory: the elif statement Alright, we learned that the if statement asks only one question and together with the else statement we can execute certain actions which would be suitable when an even...
Step 8 - Learn Functions
Theory. We have already used two functions: print() and input(). It’s now time to create our own function! A function is basically a block of some code which has a name. Why do we need functions...
Step 9 - Learn the While Loop.
Theory. The while loop in Python is like a repetitive task that continues as long as a certain condition remains True. It’s similar to driving on a road until you reach a specific destination. Im...