Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
8d80d61
Added assigment to lists.md lesson
razorblade23 Sep 7, 2026
3314b18
Changed assigment in lesson 03-user-input to better follow the storyline
razorblade23 Sep 7, 2026
5a8276c
Changed assigment in lesson 02-math-string-ops to better follow story…
razorblade23 Sep 7, 2026
29373ff
Fixed assigments due to mistake in copy-paste
razorblade23 Sep 7, 2026
d72917c
Updated Learn More resources
razorblade23 Sep 7, 2026
48a2aa5
Added assigment and closing words to tuples lesson
razorblade23 Sep 10, 2026
519f228
Added assigment for lesson on sets
razorblade23 Sep 10, 2026
9c0f4aa
Fixed assigment in set lesson and added assigment to dictionary lesson
razorblade23 Sep 10, 2026
f8b636d
Updated lists lessons and ROADMAPmd
razorblade23 Sep 12, 2026
1da5db3
Merge branch 'main' into curriculum/data-structures
razorblade23 Sep 12, 2026
c8504ae
Added basics of coprehensions lesson
razorblade23 Sep 12, 2026
f29e900
Added more content to coprehensions lessons
razorblade23 Sep 13, 2026
4b331b8
Fixed code block to be 'interactive'
razorblade23 Sep 13, 2026
71088b3
Fixed "WHATS'S NEXT" in dictionary lesson and added "WHAT'S NEXT" sec…
razorblade23 Sep 13, 2026
8dea13e
Fixed typos
razorblade23 Sep 15, 2026
232c0df
Merge branch 'main' into curriculum/data-structures
razorblade23 Sep 16, 2026
dd7c003
Couple of changes to lesson and better ROADMAP.md
razorblade23 Sep 16, 2026
6a7903f
Fixed "Learn More" sections and made them all similar style
razorblade23 Sep 16, 2026
dc1a186
Updated roadmap with missing topics
razorblade23 Sep 16, 2026
b59c0eb
first comm.. for ask4help
tkcompani Sep 26, 2026
34f582c
First on repo corr...
tkcompani Sep 27, 2026
264d592
Merge branch 'main' into master
razorblade23 Sep 27, 2026
030175a
test3
tkcompani Sep 28, 2026
2e9e7cf
Couple of changes to lesson and better ROADMAP.md
razorblade23 Sep 16, 2026
e4497d0
ask4help update v0.1
tkcompani Oct 1, 2026
87f7386
Update CONTRIBUTING.md to better instruct contributors
razorblade23 Sep 27, 2026
2bfe0cf
Added automated scripts for pushing ROADMAP updates automaticly on Is…
razorblade23 Sep 27, 2026
ba339a9
Added a reconcile step for manual triggering and scheduled at 04:00 AM
razorblade23 Sep 27, 2026
31b6ff2
Updated workflow to use PAT token for signing the commits to allow by…
razorblade23 Sep 27, 2026
58454ab
Improve error handling in sync_discord.py
razorblade23 Sep 27, 2026
373e1a5
Update payload to include empty content in patch_message
razorblade23 Sep 27, 2026
d0d0c00
chore: sync roadmap status [skip ci]
razorblade23 Sep 27, 2026
79b10f1
Added contributor(s) name(s) to ROADMAP.md sync scripts and updated R…
razorblade23 Sep 28, 2026
f95c6b5
Fixed "WHATS'S NEXT" in dictionary lesson and added "WHAT'S NEXT" sec…
razorblade23 Sep 13, 2026
244e464
ask4help update v0.2
tkcompani Oct 2, 2026
3d2eba2
Added automated scripts for pushing ROADMAP updates automaticly on Is…
razorblade23 Sep 27, 2026
1cb9de0
Added a reconcile step for manual triggering and scheduled at 04:00 AM
razorblade23 Sep 27, 2026
e6be916
chore: reconcile roadmap status [skip ci]
razorblade23 Sep 27, 2026
9398877
chore: sync roadmap status [skip ci]
razorblade23 Sep 27, 2026
7202349
chore: sync roadmap status [skip ci]
razorblade23 Sep 27, 2026
a076b54
chore: sync roadmap status [skip ci]
razorblade23 Sep 27, 2026
df82d82
chore: sync roadmap status [skip ci]
razorblade23 Sep 27, 2026
39f133c
chore: sync roadmap status [skip ci]
razorblade23 Sep 27, 2026
873f976
chore: sync roadmap status [skip ci]
razorblade23 Sep 27, 2026
62d67f1
chore: reconcile roadmap status [skip ci]
razorblade23 Sep 28, 2026
ccd78af
chore: sync roadmap status [skip ci]
razorblade23 Oct 1, 2026
dd8133f
Updated lists lessons and ROADMAPmd
razorblade23 Sep 12, 2026
ad12403
Fixed "WHATS'S NEXT" in dictionary lesson and added "WHAT'S NEXT" sec…
razorblade23 Sep 13, 2026
680c44c
Couple of changes to lesson and better ROADMAP.md
razorblade23 Sep 16, 2026
5ceb880
Updated roadmap with missing topics
razorblade23 Sep 16, 2026
0c0a550
test3
tkcompani Sep 28, 2026
fa416b9
Added automated scripts for pushing ROADMAP updates automaticly on Is…
razorblade23 Sep 27, 2026
ae56c1e
Added automated scripts for pushing ROADMAP updates automaticly on Is…
razorblade23 Sep 27, 2026
c2f6021
Added a reconcile step for manual triggering and scheduled at 04:00 AM
razorblade23 Sep 27, 2026
5bef891
chore: reconcile roadmap status [skip ci]
razorblade23 Sep 27, 2026
ffc3539
chore: sync roadmap status [skip ci]
razorblade23 Sep 27, 2026
e2d340a
chore: sync roadmap status [skip ci]
razorblade23 Sep 27, 2026
dcfc661
chore: sync roadmap status [skip ci]
razorblade23 Sep 27, 2026
6ee47f0
chore: sync roadmap status [skip ci]
razorblade23 Sep 27, 2026
29a8cc1
chore: sync roadmap status [skip ci]
razorblade23 Sep 27, 2026
3deb9a9
chore: sync roadmap status [skip ci]
razorblade23 Sep 27, 2026
f068a2f
chore: sync roadmap status [skip ci]
razorblade23 Sep 27, 2026
52bca14
chore: reconcile roadmap status [skip ci]
razorblade23 Sep 28, 2026
3133b02
chore: sync roadmap status [skip ci]
razorblade23 Oct 1, 2026
73afb43
Updated lists lessons and ROADMAPmd
razorblade23 Sep 12, 2026
0fd5694
Fixed "WHATS'S NEXT" in dictionary lesson and added "WHAT'S NEXT" sec…
razorblade23 Sep 13, 2026
34ef0d6
Couple of changes to lesson and better ROADMAP.md
razorblade23 Sep 16, 2026
b8b4d98
Updated roadmap with missing topics
razorblade23 Sep 16, 2026
6881bd9
test3
tkcompani Sep 28, 2026
70a3b26
Added automated scripts for pushing ROADMAP updates automaticly on Is…
razorblade23 Sep 27, 2026
e6d6ebd
Added a reconcile step for manual triggering and scheduled at 04:00 AM
razorblade23 Sep 27, 2026
feae0f5
Added automated scripts for pushing ROADMAP updates automaticly on Is…
razorblade23 Sep 27, 2026
dd52e08
Added a reconcile step for manual triggering and scheduled at 04:00 AM
razorblade23 Sep 27, 2026
8ffe44b
chore: reconcile roadmap status [skip ci]
razorblade23 Sep 27, 2026
be09707
Updated lists lessons and ROADMAPmd
razorblade23 Sep 12, 2026
20d10be
Fixed "WHATS'S NEXT" in dictionary lesson and added "WHAT'S NEXT" sec…
razorblade23 Sep 13, 2026
6867475
test3 over-ride for corr...
tkcompani Oct 2, 2026
a0537f4
Merge branch 'main' into master
tkcompani Oct 2, 2026
647bdbd
v0.3 ask4help
tkcompani Oct 3, 2026
68d1cc5
feat(curriculum): add lesson on functions (#62)
tajirdev Oct 3, 2026
b0894b6
fixed small typo and code syntax issues
tajirdev Oct 3, 2026
e3f79da
fixed [] issue and typo issues
tajirdev Oct 3, 2026
8598293
Updated "assigment" to first 3 lessons containing it
razorblade23 Sep 23, 2026
4ddac7b
Aligned and improved assigment in 03-user-input lesson
razorblade23 Sep 23, 2026
782bb3c
Last update to lesson assigments
razorblade23 Oct 5, 2026
46ca589
Merge branch 'main' of https://github.com/ThePythonLedger/Curriculum …
tkcompani Oct 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .git-bestPractices
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#after every update and before any commit/push, run:
- git fetch upstream
- git rebase upstream/main
- git push origin master

10 changes: 10 additions & 0 deletions .github/workflows/sync_roadmap_status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ jobs:
with:
ref: main
token: ${{ secrets.ROADMAP_PAT }}
runs-on: ubuntu-latest
steps:
if: github.event_name == 'issues' || github.event_name == 'pull_request_target'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main

- uses: actions/setup-python@v5
with:
Expand All @@ -62,6 +70,7 @@ jobs:
run: python scripts/roadmap/sync_discord.py
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}

DISCORD_MESSAGE_IDS: ${{ vars.DISCORD_MESSAGE_IDS }}

reconcile:
Expand Down Expand Up @@ -96,4 +105,5 @@ jobs:
run: python scripts/roadmap/sync_discord.py
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}

DISCORD_MESSAGE_IDS: ${{ vars.DISCORD_MESSAGE_IDS }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.obsidian/**
.obsidian
.trash
.trash
.git-bestPractices
.vscode/extensions.json
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"bowlerr.offline-markdown-preview"
]
}
123 changes: 116 additions & 7 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ This may be subject to change.
1. Introduction
* [x] How course works?
* [x] Motivation and Mindset
* [ ] 🚧 Asking for Help — #32 👤 tkcompani
* [ ] Asking for Help — #32
* [ ] Asking for Help (WIP) — #32
* [ ] Asking for Help — #32
* [ ] Join the Community — #33
* [x] Computer Science basics, Programming and Python
2. Prerequisites
Expand All @@ -29,11 +31,11 @@ This may be subject to change.
* [x] User Input and Conditionals
* [x] Loops
5. Data Structures
* [ ] 🚧 Lists — #57 👤 razorblade23
* [ ] 🚧 Tuples — #58 👤 razorblade23
* [ ] 🚧 Sets — #59 👤 razorblade23
* [ ] 🚧 Dictionaries — #60 👤 razorblade23
* [ ] 🚧 Coprehensions (`list`, `dict` `set`) — #61 👤 razorblade23
* [ ] Lists — #57
* [ ] Tuples — #58
* [ ] Sets — #59
* [ ] Dictionaries — #60
* [ ] Coprehensions (`list`, `dict` `set`) — #61
6. Code Organization
* [x] Functions — #62
* [ ] 🚧 Scope and Namespaces (LEGB rule) — #63 👤 tajirdev
Expand Down Expand Up @@ -62,6 +64,66 @@ This may be subject to change.
11. Capstone Project 3
* [ ] Capstone Project
12. Built-in and Modules
* [-] Data Structures
* [-] List
* [-] Tuple
* [-] Set
* [-] Dictionary
* [ ] Functions
* [ ] Project 1
5. Modules, Working with Files and Error Handling
* [ ] Working with multiple files (`__init.py__`, directory structure, etc...)
* [ ] Opening, Closing and Manipulating files
* [ ] Error Handling (`try-except-else-finally`)
* [ ] Custom Exceptions
* [ ] Defensive Coding patterns
* [ ] Working with structured data (`json`, `csv`, etc...)
* [ ] Project 2
6. OOP, Virtual Environments and third party libraries, Working with APIs
* [ ] Classes and OOP
* [ ] Usage and setup of virtual environments
* [ ] Installation of third party libraries
* [ ] Working with APIs
* [ ] Project 3 - *probably: * weather app
7. Working on Projects, Solving bugs, Reading errors
* [ ] Motivation and Mindset
* [ ] Asking for Help (WIP)
* [x] Join the Community
* [x] Computer Science basics, Programming and Python
2. Prerequisites
* [x] Software Installation
* [x] Text and Code Editors
* [x] Command Line Basics
* [x] Python - REPL vs Scripts
3. Git Basics
* [x] Introduction to Git
* [x] Setting up Git and Github
* [x] Git Basics
4. Foundations
* [x] Output, Variables, Core Datatypes
* [x] Arithmetic and String Operations, Comparisons
* [x] User Input and Conditionals
* [x] Loops
5. Data Structures
* [x] Lists
* [x] Tuples
* [x] Sets
* [x] Dictionaries
6. Comprehensions
* [ ] List Coprehension
* [ ] Set Coprehension
* [ ] Dict Coprehension
7. Code Organization
* [ ] Functions
* [ ] Scope and Namespaces (LEGB rule)
* [ ] Understanding Errors and Error Handling
* [ ] File Handling
* [ ] Modules
8. Capstone Project 1
* [ ] Problem Solving
* [ ] Problem Solving - Fizz-Buzz Example
* [ ] Capstone Project
9. Built-in and Modules
* [ ] `math` module
* [ ] `json` module
* [ ] `random` module
Expand All @@ -74,6 +136,53 @@ This may be subject to change.
* [ ] Virtual Environments
* [ ] Using `pip` and `requirements.txt`
* [ ] Creating python package - `pyproject.toml` file
10. Capstone Project 2
* [ ] Clean Code Priciples
* [ ] Capstone Project
11. Object Oriented Programming - Part 1
* [ ] Introduction to classes and instances
* [ ] Methods (instance, class, static)
* [ ] Dunder Methods (`__str__`, `__repr__`, etc...)
12. Capstone Project 3
* [ ] Capstone Project
13. Object Oriented Programming - Part 2
* [ ] Four Pillars of Object-Oriented Programming (Encapsulation, Abstraction, Inheritance, Polymorphism)
18. Capstone Project 6
10. Third-party Modules
* [ ] Virtual Environments
* [ ] Using `pip` and `requirements.txt`
* [ ] Creating python package - `pyproject.toml` file
11. Capstone Project 2
* [ ] Clean Code Priciples
* [ ] Capstone Project
12. Object Oriented Programming - Part 1
* [ ] Introduction to classes and instances
* [ ] Methods (instance, class, static)
* [ ] Dunder Methods (`__str__`, `__repr__`, etc...)
13. Capstone Project 3
* [ ] Capstone Project
14. Object Oriented Programming - Part 2
* [ ] Four Pillars of Object-Oriented Programming (Encapsulation, Abstraction, Inheritance, Polymorphism)
15. Capstone Project 4
* [ ] Capstone Project
10. Third-party Modules
9. Third-party Modules
* [ ] Virtual Environments
* [ ] Using `pip` and `requirements.txt`
* [ ] Creating python package - `pyproject.toml` file
10. Capstone Project 2
* [ ] Clean Code Priciples
* [ ] Capstone Project
11. Object Oriented Programming - Part 1
* [ ] Introduction to classes and instances
* [ ] Methods (instance, class, static)
* [ ] Dunder Methods (`__str__`, `__repr__`, etc...)
12. Capstone Project 3
* [ ] Capstone Project
13. Object Oriented Programming - Part 2
* [ ] Four Pillars of Object-Oriented Programming (Encapsulation, Abstraction, Inheritance, Polymorphism)
14. Capstone Project 4
* [ ] Capstone Project
* [ ] ? Linting, Formatting, Type Checking (`ruff`, `mypy`) ?
14. Capstone Project 4
* [ ] Clean Code Priciples
Expand All @@ -90,4 +199,4 @@ This may be subject to change.
17. Object Oriented Programming - Part 2
* [ ] Four Pillars of Object-Oriented Programming (Encapsulation, Abstraction, Inheritance, Polymorphism)
18. Capstone Project 6
* [ ] Capstone Project
* [ ] Capstone Project
109 changes: 107 additions & 2 deletions curriculum/01-introduction/03-asking-for-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,110 @@ sidebar_position: 3
lesson: true
isDraft: true
---
# Asking For Help
## Work in progress

# Asking For Help ❔
**INTRODUCTION**: Getting stuck in your coding or even a learning is really part of the journey, and that is the number one why this lesson (ask for help) exists.

## The Goal 🥅⚽
In this lesson you will learn how to get help whenever you need it. And by the end of this lesson you should be familiar with getting stuck and how to seek for help.


## Lesson outline 📝
* How to Get Help
* Who to Ask for Help
* Where to Ask for Help (**Under Construction...**)

## How to Get Help ❔
Steps to follow to get help:
* Before you ask, do some checks
* Use the question space
* format your code properly
* Know what to expect next

### 1. Before You Ask ⤴➡
Before you ask anything check if:
- your indentations are correct or valid
- your syntax are correct or valid
- your code is complete as you intended

**If** any of above is False, Fix them and re-run your code.

**Else**, if all of above is True and error still persist, proceed to the step 2(the question space) of this topic.


### 2. The Question space 📰❔
Carefully study the `code` below:

```python

var1 = "12"
var2 = 12

results = var1 + var2 #this raises an error, why?—you will learn how to go about finding a soln—to the why, how, &what.

```
Your `code` should follow the pep8 style, as well as the `syntax` should be valid so you get an appropriate help response.

### 3. How to Format Your Code 🔃
- You are required to format your code (_python code_) using the markdown language in order to get the appropriate responses to your help requests.

Steps to format your code:
- Type in three of the ` ``` ` character(three) to open it and close with another three of the ` ``` ` character.
- In between the opening and closing character sets, type `python` and enter a `space` character. You should have something like this: ` ```python ``` ` .
- Press `Enter` to go to a new line, now you are set to paste your `code` for submission—make sure the code syntax is valid, and is same as the one which raised the error; that is the `indentaion`, `spacing`, and `others` are all same.


### 4. What to Expect Next ➡
Once you have submitted your help request, sit down tight and the appropriate help will be sent straight to you.

If unfortunately the help response delays or never comes, use the next approach which is _Who To Ask_.


## Who to Ask for Help 🧔🏻❔
subs:
* Ask yourself
* Ask someone with experience
* Ask a trusted community
* Ask an Ai agent

### 1. Ask Yourself Before Anyone
You may say, why myself, i don't know?—Ofcourse you know all the answers to your own questions most of the times. **Ask yourself why, why did the error come; Ask yourself how, how did the error come; and Ask yourself what, what brought up a particular error** :(. You are not actually finding the correct solution to the cause of the error with these questions overnight (as if it was a magic :)), **but** what you are doing is you are training your thinking, which may help you think creatively gradually—to solve future problems. "Problem solving requires a creative and effective thinking"—Baldwin.J,. college success(2021).

After you have had your answers to those three question, store them safely as we will learn how they might become useful later in this lesson.

### 2. Ask Someone with Experience
Why ask someone with experience?—An experienced programmer, specifically python programmer, knows how to solve or debug almost every bug or error respectively. Therefore asking an experienced person means there is a higher probability you will get a solution to an/a error/bug.

Now let see how your answers at the _ask yourself_ sub gets useful here. Compare your answers obtained at the _ask yourself_ sub to the ones you obtained from the experienced programmer and **Ask youself one more time—what did i missed?**—Keep this particular answer to yourself (treat it as important), it might help you in your future decisions when debugging other or similar errors later on.

### 3. Ask a Trusted Community
Though there isn't a full guarantee that a community will contain only experienced programmers,—That is there would be beginners, intermediates and experts—but there are people with at least an experience if not much, these people might have already at least solved a bug which you just met, and could share with you how they handled it—which might be a fantastic approach you could learn also.

Therefore asking verified communities like the stackoverflow, github, telegram groups, reddit, discord and others i could'nt mention—though one should proceed this with caution—is a must once you are learning the python or any other programming langauge.

### 4. Ask an AI Agent
AI tools or agents are a smart way to debug errors faster, but the question is—Does the AI agent know the best approch to avoid future code breaks?

This does not neccessarily mean using AI assistance for debugging errors is bad. But for best decision sake; That is if you know enough or understand how to select the best approach out of the many provided by the AI model, then you are encouraged to proceed with this approach—the advice is simple, that is use AI to recall the best solutions you already know quickly and not to decide the best solutions for you.

This really counts in a serious project or even in the real world practices, but it is also a good thing to keep it in practice now—even if you are learning.


## Where to Ask for Help
Subs:
- Ask the social media
- Ask in learning centers

### 1. Ask the Social Media
At least anyone who owns a smart device has an account registered on a social media platform—Some popularly known ones are: _WhatsApp, Facebook, Twitter, TikTok, Reddit, Discord, etc._—and on these platform so might be as well all kinds of programmers—experienced ones specifically.

__Note__:
```text
In case it comes to pass that you are not registered on any of these platforms, just register on any of them to get started.
```
**Don't just ASK** _"Hello everyone i need help with fixing a bug"_—without a link to code, media files, just this text or similar— this will actually lead others to either just leave a 'like' or do nothing. _What is the right way to ask the social media?_— **ASK by** including a clear title, clear content/message describing the error process and your expectations, a link to the code somewhere or a screenshot of the code, and optionally the methods you have used that never worked.

### 2. Ask in Learning Centers

- _work in progress_

33 changes: 25 additions & 8 deletions curriculum/05-data-structures/01-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ lesson: true
isDraft: true
---
# List
## Introduction {#introduction}
Up until now we have stored a single value in a variable, but what if we need to hold multiple values in some variable? Do we create multiple variables? Of course not, Python has a *built-in* mechanisms for dealing with collections of data which we call **data structures**. In this lesson we first take a look at **list**.

Lists in Python are *built-in* data structure for storing ordered collections of items. They are **ordered** meaning they keep the order in which data came in. They are also **mutable** which means we can change them in place without creating a new copy. They can hold any other type of data including other lists or other data structures. Lists are probably the most used data structure in Python.
Expand Down Expand Up @@ -147,19 +146,37 @@ for item in a:
This is very useful as we often need to work with specific elements from the list.

:::explore[Learn more about Python lists]

Learn more about Python Lists from these resources:
* [Google for Education - Python Lists](https://developers.google.com/edu/python/lists)
* [Official Python Documentation on Lists](https://docs.python.org/3/library/stdtypes.html#typesseq-list)
* [Official Python Documentation on Data Structures - more on Lists](https://docs.python.org/3/tutorial/datastructures.html#more-on-lists)

* Learn about `zip()` function from [zip() function - RealPython](https://realpython.com/ref/builtin-functions/zip/) and [zip() function - official Python Documentation](https://docs.python.org/3.3/library/functions.html#zip) that allows for combining of multiple lists (or other iterables as we will see later) by producing **tuples** (we cover these in the next lesson)
* Learn about `.sort()` method from [official Python Documentation](https://docs.python.org/3/library/stdtypes.html#list.sort) which is very useful in sorting lists in-place. Sorting iterables is a very useful tehnique and there are multiple arguments and ways to sort iterables in Python. Be sure to read this [Sorting Tehniques - official Python documentation](https://docs.python.org/3/howto/sorting.html) to familiarize yourself with tehniques used.
* Go thrue all the available methods on the lists in [More on Lists - official Python documentation](https://docs.python.org/3/tutorial/datastructures.html#more-on-lists), as these will come in handy when working on your projects. You do not need to remember them all, but just read thrue them and their intended purpouse so you will know what is out there.
:::

## Exercise
Complete [Exercise 05 — The Cozy Bakery Inventory](#) to practice list creation, indexing, modification, and using python documentation to solve list tasks.
Complete [[TODO] Exercise 05 — WorkingTitle](#) to practice list creation, indexing, modification, and using python documentation to solve list tasks.

## Assignment {#assignment}
**Todo**
1. Open `main.py` file in our `simple-python-shop` directory
2. Replace `item_name`, `item_price` and `item_stock` static values with an empty list.
3. In *infinite loop* ask the user to fill up the inventory by typing in a name, price and stock level of item.
* If user types **empty string**, break out of the loop and continue with program execution.
* User should enter all of the information on the same line. Use `.split()` method on the inputed string to catch all information needed. **Do not forget** to cast `price` to `float` and `stock` to `integer`.
* Append every information to their own respective list.
4. Display the inventory by using `zip()` function and combining all three lists to display items one by one.
5. Create variable `order` and assign it an empty list.
6. Create another *infinite loop* and inside the loop ask the user to enter the name of the item he wants to buy.
* If user enters empty string, break out of the loop.
* If the item user entered is in the `item_name` list, find its index position and assign it to variable, otherwise inform the user that there is no such item at the moment, and **continue** with next iteration of loop
* When you have an index of the item user asked, ask the user to enter quantity of the items. Check if entered item quantity is not bigger then actual item stock and if it is, tell the user that we do not have that many items in stock, then **continue** with new iteration.
* If we have the item and have enough of stock, add the total for item (item price multiplied by quantity) to `order` list.
* Decrease the stock number of items by the quantity ammount and if item stock reaches 0, remove the item (and its relevant info) from the inventory lists.
7. Calculate the total by adding all the numbers in `order` list using `sum()` function and calculate whether to give 10% discount (if `total > 100`).
8. Print out the final receipt in the following format:
```
Your total is: $<total>
```
9. Print the inventory after shopping.
10. Make sure your application works correctly, commit the changes and push your code to Github.

## What's Next {#next-lesson}
Lists are ordered and mutable, which makes them ideal for collections that grow or change over time. But what if you need an ordered collection that **cannot** be modified once created?
Expand Down
Loading
Loading