> ## Documentation Index
> Fetch the complete documentation index at: https://python-training.ipoint-labs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Lab 13: Collatz sequence

> Hands-on lab · 20 min · Module 5

Follow the Collatz rule from any starting number down to 1, printing each number and counting the steps.

[Open Lab 13 in the IP Lab Portal](https://labs.intellectualpoint.com/labs/pcep-lab-13-collatz)

## What you will practice

* Write a loop whose length is not known in advance
* Branch on even and odd values
* Count the steps taken

## Before you start

Time
20 minutes
*Hands-on in Python 3*

Where
IP Lab Portal
*labs.intellectualpoint.com*

Module
Module 5: Loops
*PCEP-30-03*

* In the IP Lab Portal, open **Lab 13 - Collatz sequence**.
* In class, this lab comes right after the **Lesson 5 recap** slide in [Module 5 core material](https://python-training.ipoint-labs.com/pcep/module-05/material.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.