Intro to Python

Jaskomal
3 min readAug 30, 2021

If you’ve been looking at software engineering jobs you know that Python is one of the most sought after programming languages out there. More often than not companies post in the preferred part of a job listing Python knowledge is a plus or something along those lines. Why is Python so in demand? Well it’s written straightforward, has a ton of libraries, and is versatile meaning you can use it to code anything from web apps, to machine learning. In this article I’ll go over how primitive data types are written in Python.

First thing to know when learning a new language is the ever important comment otherwise how would you write pseudocode. In Python to write a comment we use the #.

The next thing is printing out results to the screen, which is essential to check your code is working properly. So how do we do this in Python? We just type in print() and whatever we want displayed we put in between the parenthesis.

Arithmetic operators in Python are almost identical to other programming languages.

Python follows order of operations so if you want something added up before it’s multiplied be sure to put the addition inside of parenthesis.

Assigning variables in Python is clean and easy since they don’t need variable type to stated when creating the variable. Also you can assign multiple variables in a single line if you like seeing everything written out horizontally.

For numeric data values we use int and float. Ints are whole numbers while floats are numbers that have a decimal point in them.

You can also use type to find out the data type of the value anything from string, to int, to float to boolean.

And the final primitive data type I want to talk about is the boolean, which is true or false comparison operator. These are found using the < and the > operators along with !.

--

--