Coding is the process of using a programming language to get a machine to do things for us. Like programming a drone to get food or writing a piece of code to do our homework.(no offense teachers but like everyone does it.)
The area where you write the code is called an Editor.
The area where the machine shows the result of your program is called the Console.
There are many different programming languages and can be classified into four groups:
- Procedural Programming
- Functional Programming
- Object-oriented Programming
We don’t need to know what they mean yet but here a few examples of each:
- Procedural Programming – Fortran, Pascal, C, Java
- Functional Programming – LISP, Scala, Erlang
We will be focusing on Python. It is super easy once you know the basics. It is very simple so don’t take all the hype the wrong way. It is so simple and that is why everybody uses it.
The first thing you need to know in programming is a print statement. When you write print(“Hello world”) into the Editor, the Console prints out Hello world. You can write anything in the “quotes” and it will print it out. Including emojis. I tried it.😝
There are a few main data types or ways of classifying code:
Boolean – True or False(a true or false statement can be written in the Editor)
Editor: 1 = 1
String – An array of Unicode characters or a set of characters in quotes
Editor: print(“Me: I heart programminnnnggggg. /n Programming: Thanks g.”)
Console: ‘Me: I heart programminnnnggggg. Programming: Thanks g.’
Float – written with a decimal point
Integer – positive or negative whole numbers without a decimal point
Character – In python, a string with a length of 1
To check which data type certain element(s) can be classified as we can type the elements in the console and press enter.
To start a new line in the console, type /n before the characters you want to enter in the new line. For example:
Editor: print(“So lock the door And throw out the key /n Don’t judge. I’m in 2020. /n Not meant to rhyme”)
Console: So lock the door And throw out the key
Don’t judge. I’m in 2020.
Not meant to rhyme
That’s it for now, Thanks so much for reading guyyyyyssss.