What are data-types?

devdrake0

Si

Posted on May 31, 2019

What are data-types?

A bit of information (data) always has a certain type

What are data-types?

Each programming language has different data-types or names them differently, but most of them have a variation of these four:

Booleans

Booleans are simple binary values (true or false).

isTrue = true
isFalse = false
Enter fullscreen mode Exit fullscreen mode

In our previous article about if statements we showed you how programs determine between executing a block of code or not. The condition that is used for this can ultimately only have two outcomes: do it (true) or don't do it (false).

Integers

Integers are whole numbers (with no decimal places).

number = 5
Enter fullscreen mode Exit fullscreen mode

Floats

Floats are numbers that can have decimals, but do not always have to.

number = 3.5
Enter fullscreen mode Exit fullscreen mode

Strings

Strings are simply a series of characters (like words, names or whole sentences)

id = ckjasdiwe98213
name = John
lastname = Doe
job = John is working at a farm, growing potatoes
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
devdrake0
Si

Posted on May 31, 2019

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

What is an else statement?
beginners What is an else statement?

May 31, 2019

What is a switch statement?
beginners What is a switch statement?

May 31, 2019

What are comments?
beginners What are comments?

May 31, 2019

What is pseudocode?
beginners What is pseudocode?

May 31, 2019

What is testing?
beginners What is testing?

May 31, 2019