GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Modul 2 von 24 · Text

Literals - the data in itself 2

David Khieu

Literals - the data in itself

Let's start with a simple experiment - take a look at the snippet in the editor. 

The first line looks familiar. The second seems to be erroneous due to the visible lack of quotes. 

If everything went okay, you should now see two identical lines. 

What happened?> What does it mean? 

Through this example, you encounter two different types of literals: 

  • a string, which you already know. 
  • and an integer number, something completely new. 

The print() function presents them in exactly the same way - this example is obvious, as their human-readable representation is also the same.  Internally, in the computer's memory, these two values stored in completely different ways - the string exists as just a string - a series of letters. 

The numbers converted in machine representation (a set of bits). The print() function is able to show them both i a form readable to humans. 

We're now going to be spending some time discussing numeric literals and their internal life. 

 

Anleitung

Um im Kurs weiterzukommen, sende einen Versuch dieses Quiz ab. Du kannst ihn nach der letzten Frage absenden.

Zum gewählten Modul

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck