Coding for Beginners(readable edition)

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 
  • Scripting

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
  • Object-oriented Programming – Java, JavaScript, C++, Python
  • Scripting – Bash, JavaScript

 

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

Console: True 

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

Editor: print(3.0)

Console: 3.0

Integer – positive or negative whole numbers without a decimal point

Editor: print(5,000,000,000)

Console: 5,000,000,000

Character – In python, a string with a length of 1

Editor: print(“S”)

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. 

Stay stoked.

🤸

Saanvi left.

 

 

 

Back to Top