Numbers & Text

Learn to Code Today!

Learn 10x faster: coding, no-code and data skills. Join millions of users mastering new tech skills and accelerating their career with Enki.
Get started

This is part of “An intro to Coding” series of posts, with content from the Enki app. If you stumbled upon this, you can start from the beginning.

Numbers

Just as in maths, we can categorize numerical data based on their properties.

  • we can have whole, or integer numbers like 1, 999, -13
  • we can have fractional numbers or floats like 12.33, 0.0001, -13.2
  • we can even have complex numbers like 13 + 2j

In order to make everything easier and faster to work with, programming languages usually have different ways to store and interact with these types of numbers.

Let's define an integer!

💡 Depending on the programming language, you might have to type the data type before the variable name.

Text

In the land of computers, the text type is almost never called text.

Instead, it is referred to as a string¹ (meaning a string of characters).

We've already seen this type before when creating the best_app variable.

Now, let's make another one:

💡 To help the computer distinguish strings from variable names, we wrap strings in quotes (" "). In some programming languages, you can also use single quotes (' ') and/or backticks (` `).

About Enki

  • Fully personalized online up-skilling
  • Unlimited AI coaching
  • Designed by Silicon Valley experts

More articles

Meet your AI-enabled coach

Professional athletes have a coach for every aspect of their performance. Why can’t you for your work? Enki’s AI-powered coaching on-demand - combined with state of the art, structured learning content - makes this a reality.
1
1:1 AI Coaching
How do I remove duplicate emails?
Convert the list to a set and back to a list. Sets automatically remove duplicates.
2
Personalized Exercises
3
Interactive practice

Unlock full access to all skills on Enki with a 7-day free trial

Get started