> For the complete documentation index, see [llms.txt](https://python.microcisco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://python.microcisco.com/python-inststitute-pcap/python-essentials-part-1/module-2/literals/section-summary.md).

# Section Summary

## Key Takeaways

* Literals are notations for representing some fixed value in code. Python has various types of literals:
  * a literal can be a number (numeric numbers e.g.`123`)
  * or a string (string literals e.g. "I am a literal")
* The binary system is a system that uses 2 as the base and is made up of 0's and 1's
* The octal system is a system that uses 8 as the base
* The hexadecimal system uses 16 as the base and uses the decimal numbers and A-F letters
* Integers are whole positive or negative numbers
* Floats or Floating Point are numbers that contain a fracrional componenet (e.g. `1.27`)
* To encode an apostrophe or quote inside a string you can either use the escape character eg `'I\'m happy.'` or open and close the string using an **opposite** set of symbols (double quote) to the ones you which to encode eg `"I'm happy"` to encode an apostrophe, and a single quote to encode a double quote eg. `'He said "Python", not "Typhoon" '`
* Boolean values are either **True** or **False**  and represented by `1` and `0` respectively
* There is another type of literal: the **`None`** literal and is used to represent the **absence of a value**

### Exercise

**Exercise 1**

What types of literals are the following two examples? `"Hello ", "007"` They are both strings/string literals

#### Exercise 2

What types of literals are the following four examples? `"1.5", 2.0, 528, False` They are string, floating-point, integer and Boolean literals

**Exercise 3**

What is the decimal value of the following binary number? `1011` - The answer id 11\
8  4  2  1\
1  0  1  1 ------- Add up 8+2+1 = 11


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://python.microcisco.com/python-inststitute-pcap/python-essentials-part-1/module-2/literals/section-summary.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
