Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 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
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
147 changes: 132 additions & 15 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,58 @@ This may be subject to change.
## Roadmap
1. Introduction
* [x] How course works?
* [x] Motivation and Mindset
* [ ] Asking for help
* [ ] Join the Community
* [x] Computers and Programming Languages (CS Basics)
2. Prerequisites
* [x] Installation of required software
* [x] Text Editor basics
* [x] Command Line basics
* [x] Python - What is it? REPL vs Scripts
* [ ] 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. Python Foundations
* [x] Output (print), Variables, Core Datatypes
* [x] Math, String operations, Comparisons
* [x] User input, Conditionals
* [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
* [ ] Lists (WIP)
* [ ] Tuples (WIP)
* [ ] Sets (WIP)
* [ ] Dictionaries (WIP)
* [ ] Coprehensions (`list`, `dict` `set`) (WIP)
6. Code Organization
* [ ] Functions
* [ ] Scope and Namespaces (LEGB rule)
* [ ] Type Hints
* [ ] Modules
7. Capstone Project 1
* [ ] Problem Solving
* [ ] Problem Solving - Fizz-Buzz Example
* [ ] Capstone Project - **Hangman game**
8. Errors, Debugging, I/O
* [ ] Understanding Errors and Error Handling
* [ ] `logging` module
* [ ] Debugging tehniques
* [ ] File Handling
9. Capstone Project 2
* [ ] Git Workflow: Branches and Pull Requests
* [ ] Revisiting Project 1 (hangman game):
* Creating branch, adding features, merging back to `main`
* Loading *words* from external file
* Catching and logging errors
* [ ] Capstone Project
10. Intermediate Python
* [ ] Decorators
* [ ] Generators
* [ ] Context Managers
11. Capstone Project 3
* [ ] Capstone Project
12. Built-in and Modules
* [-] Data Structures
* [-] List
* [-] Tuple
Expand All @@ -48,4 +82,87 @@ This may be subject to change.
* [ ] Installation of third party libraries
* [ ] Working with APIs
* [ ] Project 3 - *probably: * weather app
7. Working on Projects, Solving bugs, Reading errors
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
* [ ] `datetime` module
* [ ] `pathlib` / `os` module
* [ ] `csv` module
* [ ] `sys` module
* [ ] `re` module
13. Third-party Modules
* [ ] Virtual Environments
* [ ] Using `pip` and `requirements.txt`
* [ ] Creating python package - `pyproject.toml` file
* [ ] ? Linting, Formatting, Type Checking (`ruff`, `mypy`) ?
14. Capstone Project 4
* [ ] Clean Code Priciples
* [ ] Capstone Project
* [ ] Testing Your Code (`pytest`)
* [ ] Revisit Project 4
* Develop a testing suite for the project
15. Object Oriented Programming - Part 1
* [ ] Introduction to classes and instances
* [ ] Methods (instance, class, static)
* [ ] Dunder Methods (`__str__`, `__repr__`, etc...)
16. Capstone Project 5
* [ ] Capstone Project
17. 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
41 changes: 40 additions & 1 deletion curriculum/01-introduction/03-asking-for-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,44 @@ sidebar_position: 3
lesson: true
isDraft: true
---

# Asking For Help
## Work in progress
**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.

## 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 stcuk and how to seek for help.


## Lesson outline
* How to Get Help
*

## How to Get Help
### 1. Before You Ask
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
Paste your code below:

′′′python

′′′

### 3. How to Format Your Code
...

### 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.

## Introduction
This lesson is intended to help you become good in seeking for help

## Work in progress
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ You will need to do this assignment on your own machine.
Item price: $67.2
Item available: True
```
7. Make sure your program works as expected then create a repository and push your code to github
7. Make sure your program works as expected then create a repository and push your code to Github.

## Deepen Your Knowlege
Go through these articles to deepen your knowlege about the topics covered in this lesson.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ In the last assignment we have declared our shop variables and printed the inven
--------------------------------
Thank you for your purchase !
```
7. Commit your changes with `git` and push to Github
7. Commit your changes with `git` and push to Github.

## Deepen Your Knowledge
1. Learn more about [Basic math in Python](https://cs.stanford.edu/people/nick/py/python-math.html#math) from article in **Stanford University**, covering all the topics in this lesson but in a different style and a bit more.
Expand Down
8 changes: 5 additions & 3 deletions curriculum/04-python-foundations/04-loops.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,12 @@ These statements `break` and `continue` work only in loops. If you try to use th

## Assigment
1. Open `main.py` in your `simple-python-shop` project.
2. Create a new variable named `item_count` and set it to `0` as its initial value.
2. Set `item_quantity` to `0` as its initial value and remove `item_price` variable.
3. Use a `while` loop to repeatedly prompt the user for an item price.
* If the price entered is 0 break out of the loop
* Otherwise, add the price user entered to `total` and increment `item_count` by 1.
* If the price entered is less then 0, print message saying `Invalid price, must be positive`, and skipping the rest of the iteration code, asking user again to enter the price.
* Otherwise check if the price entered is 0 and if so, break out of the loop.
* Otherwise, check if `item_stock - item_quantity` is more than `1` and if not, break out of the loop, informing the user we are out of stock.
* Otherwise, add the price user entered to `total` and increment `item_quantity` by 1.
4. When the loop finishes, determine if the `total` can have a discount and print out the final receipt.
5. Make sure your program works, then commit and push your code

Expand Down
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
23 changes: 17 additions & 6 deletions curriculum/05-data-structures/02-tuple.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ lesson: true
isDraft: true
---
# Tuple
## Introduction {#introduction}
Tuple is an ordered and immutable collection data structure. **Ordered** meaning it keeps the order of elements in which they are inserted, and **immutable** means that once the tuple is created it cannot change, and you cannot add or remove elements from it.

## Lesson Overview {#overview}
Expand Down Expand Up @@ -39,7 +38,7 @@ print(f"First element: {a[0]} - Last element: {a[-1]}")
```

## Useful methods
Unlike functions, as we cannot modify tuples, we don't have a lot of methods available to us, but we will list a few.
Unlike lists, as we cannot modify tuples, we don't have a lot of methods available to us, but we will list a few.
* `count()` - returns the number of times a specified value appears in tuple.
```python interactive
numbers = (1, 2, 3, 3, 3, 4, 5)
Expand All @@ -52,12 +51,24 @@ Unlike functions, as we cannot modify tuples, we don't have a lot of methods ava
```

:::explore[Learn more about Python Tuples]
* [Python built-in types: tuples from RealPython](https://realpython.com/ref/builtin-types/tuple/)
* [Tuples and Sequences from official Python documentation](https://docs.python.org/3/tutorial/datastructures.html#tuples-and-sequences)
Deep dive into Python tuples in this [Deep Dive: tuples](https://realpython.com/python-tuple/) article by **Real Python** which takes you deep in topic of tuples and their usecases.
:::

## Exercise
Complete [[TODO] Exercise 06 — WorkingTitle](#) to practice tuples.

## Assignment {#assignment}
**Todo**
Using lists to separatly hold multiple related values is brittle and will break if you do not pay attention to all lists containing data. In this assigment we will deal with those issues by using tuples.

1. Open our `main.py` file we have been working on
2. Create a new empty list called `inventory`. This will hold tuples of related data `(product_name, product_price, product_stock)`.
3. Delete previusly defined `item_name`, `item_price` and `item_stock` variables, we wont need them anymore.
4. Just like before, in **infinite loop**, first check if the input is an *empty string* and if it is, break out of the loop, otherwise get the users input containing *name*, *price* and *stock* in a single line, then split the line using `split()` method to get a list of inputed data.
5. Instead of appending each data to their own list, create a tuple called `item` containing `name`, `price` and `stock` in that particular order and append that to our `inventory` list we declared earlier. Print out each `inventory` element using `for` loop.
6. On to customer ordering items now. Keep `order` list and instead of storing only totals for each item, we will now store `item_name`, `item_quantity` and `line_total` in **tuple** called `line_item` and append that to our `order` list so our shop can better keep track of the orders. **Keep in mind** - tuples are *immutable* which means that you will have to reduce `stock` of the item by replacing entire tuple with new `stock` value.
7. Same as before, calculate the `total` for all the items bought, apply a 10% discount if the `total` is over 100.
8. In the end, print out the inventory, to make sure that the items are actually removed once bought.
9. Make sure your program runs, then commit the changes and push to Github

## What's Next {#next-lesson}
**Todo**
Now that you have seen data structures that can contain duplicates, it's time to meet **set** - a unique data structure that does not allows for duplicates.
20 changes: 14 additions & 6 deletions curriculum/05-data-structures/03-set.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ lesson: true
isDraft: true
---
# Set
## Introduction {#introduction}
A **set** in Python is unordered collection of unique elements. **Unordered** means it does not keep the order of the elements and **unique** means it does not allow duplicates.

Its mostly used when removing duplicates from list or performing quick membership tests (checking to see if some element belongs to both sets).
Expand Down Expand Up @@ -73,13 +72,22 @@ print("Difference:", set1 - set2)
```

:::explore[Learn more about Python Sets]
Learn more about sets in these materials:
* [Python built-in data types from RealPython](https://realpython.com/ref/builtin-types/set/)
* [Python data structures: set from official Python documentation](https://docs.python.org/3/tutorial/datastructures.html#sets)
Explore Python sets deeper by visiting this [built-in: set] article from **Real Python** (especially the part about additional methods which come in handy when working with sets).

Remember you do not need to remember all the methods there are. Just read through them, to know they exist.
:::

## Exercise
Complete [[TODO] Exercise 07 — WorkingTitle](#) to practice sets.

## Assignment {#assignment}
**Todo**
In this assigment our task is simple one. We need to track distinct *unsold* items so we can better prepare for the next day in our little shop.

1. Open `main.py` file we have been working on.
2. Define a set for all **sold items** (`item[0]` of element in `order` list) and define a set of **all inventory items** (`item[0]` of element in `inventory` list) - you can use set coprehension to do this in one line or use a for loop to iterate over each item in the lists.
3. Create a variable `unsold_items` and set its value to be `sold_items` substracted from `all_inventory_items`
4. Print out items that did not have a sale today.
5. Confirm the program works, commit and push to Github

## What's Next {#next-lesson}
**Todo**
Now that we covered index based data structures, it's time to meet **dictionary** which is unique in its *key-value* approach and is probably most used data structure (besides *lists*).
Loading
Loading