# Module 2: Use Boolean logic in Python

## Learning objectives

By the end this module, you'll be able to:&#x20;

* Use `if`, `else` and `elif` statements to execute code under various conditions.&#x20;
* Use `and` and `or` operators to combine conditional logic and create more complex conditions

## Prerequisites

* Basic Python programming knowledge, including the use of variables, strings, integers, and math
* Experience modifying and running code in Jupyter notebooks

## This Module is part of these learning paths

1. Introduction
2. Write "if" statements
3. What are "else" and "elif" statements?
4. Exercise - Write "if" statements
5. What are "and" and "or" operators?
6. Exercise - Use "and" and "or" operators
7. Knowledge check
8. Summary


---

# Agent Instructions: 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:

```
GET https://learn.pqtkha.com/programming/technology/python/microsoft-training-python-for-beginners/module-2-use-boolean-logic-in-python.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
