Python Easy Basics 1

Image for post on grauenwald

We are so excited that you have decided to embark on the journey of learning Python! One of the most common questions we receive from our readers are “What’s the best way to learn Python?” and “How can I easy learn the basics of Python?”.

I believe that the first step in learning any programming language is making sure you know the basics and the Syntax. The Basics are the fundament of your future Pythonista life, if you don’t master the basics you can’t even build a simple calculator and if you don’t know the Syntax you will trip on too many bugs and annoyances during coding sessions!

In this handy article we will teach you the beautiful core soul of Python.

Hello World!

print("Hello World!")      #this is just a comment

Now you’re part of the programming club!

print(“Hello World!”) is a function which prints out the data between the parentheses, in this case “Hello World!”.

The hashtag marks a comment and is only seen by the programmer

Data Types

11       #integer
11.12    #float
"WORLD"  #string
true     #boolean

Integers are natural numbers . Floats are decimal numbers. Strings are series of characters

Variables

a = 1+1
b = "this is a string"
c = true

Every programmer uses Variables. Variables store data your data so you can use it later. On this example “a” is a Variable which stores the calculation of 1 + 1 so “a” stores the value 2. The Variable “b” stores the string “this is a string” and “c” stores the boolean value true.

In a nutschell

message = "Don't trust the bees"
secretCode = 111
amIWrong = false

print(message)
print("the secret Code is",secretCode)
print("are you wrong", amIwrong)

Yippee! You learned now the first part of the basics and now you’re almost a real coder!

Click here to get to part 2

This might also interest you on programming:
This might also interest you on non programming