• Arithmetic operators
    Exponentiation (power) operator is implemented in python with ** sign Example for 212 print(2 ** 12) If you use a float in operation the result type will be float Multiplication in python is implemented via single * print( 2 * 6.3) The same thing is true here, if a single number is float the result… Continue reading Arithmetic operators
  • Variables in Python
    Until now we just printed a value of different type(string, boolean, integer, double) A variable is like a box, you put something in it, for example first_variable = 3 print(first_variable) So 3 is stored in the variable first_variable, that’s why when you print first_variable 3 is outputted. Here are the rules for defining a variable–… Continue reading Variables in Python
  • Boolean Values in Python
    Boolean values are how you can say true or false in Python. So you can have just 2 options: True or False. print(True) print(False) Keep in mind that True is not the same as true because Python is a case–sensitive language print(true) will generate an error Same thing is true for False
  • Strings in Python
    In previous posts you printed “Hello World”. Hello world type in this case is string. A string is defined by surrounding the text with apostrophe or double quotes: Example of double quotes print(“Hello World”) Example of apostrophe print(‘Hello World’) You can use apostrophe in double quotes print(“It’s time to learn strings … “) or double… Continue reading Strings in Python
  • Comments and spacing in Python
    A comment is a line of code that is ignored by python So let’s get back to Hello World Example, if you run this code print(“Hello World”) You will get the string Hello World. If you do not want to run this line of code you can comment it by adding # in front of… Continue reading Comments and spacing in Python
  • Numbers in Python
    In previous lesson you learned how to create and run a python script in PyCharm. If you managed to complete the lesson then you are ready for this lesson. Right now you know how to print a string in Python print(“Hello World”) Here is how you can print a number print(3)print(2.3) For decimal numbers keep… Continue reading Numbers in Python
  • Create and run a script in PyCharm
    Open PyCharm From File menu click New 3. Click File 4. Insert the file name and at the end insert the .py extension 5. From top right corner near green triangle click the select then click Edit Configuration 6. Enter a name, then in the script path pick the python file you just creating by… Continue reading Create and run a script in PyCharm
  • Python IDE
    So you installed Python, and now you can run python code from the app that was installed with python or from the console. This might work for some people, but I like to work with an IDE. Integrated development environment(IDE) is a software application that provides comprehensive facilities to computer programmers for software development (according… Continue reading Python IDE
  • How to install Python
    Got to python.org and download latest stable version Click Install Python 3.9.2 Windows might ask for permissions in order to continue the installation. Make sure you allow the install. Once installation is finished click close From start menu start typing “python” click Python 3.9 or whatever version you installed Next, let’s run a traditional Hello… Continue reading How to install Python