Day 4: Leveling Up with Lists and Randomness in Python 🐍

I just wrapped up Day 4 of my Python journey! Today was all about moving beyond simple scripts and learning how to handle data more dynamically. It was a challenging day, but seeing the logic come together in the end was worth it.🧠
What I Learned Toda…


This content originally appeared on DEV Community and was authored by sheema

I just wrapped up Day 4 of my Python journey! Today was all about moving beyond simple scripts and learning how to handle data more dynamically. It was a challenging day, but seeing the logic come together in the end was worth it.🧠
What I Learned Today Randomization: Using the random module to create unpredictable outcomes.Lists: How to store data in order, use offsets, and append new items.Index Errors: Learning the hard way that lists start at 0!Nested Lists: Creating lists within lists (basically making a grid or a map).🛠️
The Projects

  1. Banker Roulette A simple script that takes a list of names and randomly picks who has to pay for the meal. No more arguing over the bill!

  1. Treasure Map : This was a cool exercise in nested lists. I built a 3x3 grid where you can input coordinates (like 23) to "hide" your treasure with an 'X'. It really helped me visualize how 2D arrays work.

  1. Rock Paper Scissors The "boss fight" of the day. I built a game where you play against the computer. Managing the logic for who wins based on the list index was tricky but fun.🧗

The Struggle is Real I'll be honest: today was tough. There were moments where the logic for nested lists didn't click immediately. I used Chat GPT to help debug my errors and explain some of the more complex movements. It’s a great reminder that as a developer, you don't have to know everything instantly—you just have to know how to find the answer!

python #codingjourney #100daysofcode #learningtocode #programming


This content originally appeared on DEV Community and was authored by sheema


Print Share Comment Cite Upload Translate Updates
APA

sheema | Sciencx (2026-05-11T17:45:37+00:00) Day 4: Leveling Up with Lists and Randomness in Python 🐍. Retrieved from https://www.scien.cx/2026/05/11/day-4-leveling-up-with-lists-and-randomness-in-python-%f0%9f%90%8d/

MLA
" » Day 4: Leveling Up with Lists and Randomness in Python 🐍." sheema | Sciencx - Monday May 11, 2026, https://www.scien.cx/2026/05/11/day-4-leveling-up-with-lists-and-randomness-in-python-%f0%9f%90%8d/
HARVARD
sheema | Sciencx Monday May 11, 2026 » Day 4: Leveling Up with Lists and Randomness in Python 🐍., viewed ,<https://www.scien.cx/2026/05/11/day-4-leveling-up-with-lists-and-randomness-in-python-%f0%9f%90%8d/>
VANCOUVER
sheema | Sciencx - » Day 4: Leveling Up with Lists and Randomness in Python 🐍. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2026/05/11/day-4-leveling-up-with-lists-and-randomness-in-python-%f0%9f%90%8d/
CHICAGO
" » Day 4: Leveling Up with Lists and Randomness in Python 🐍." sheema | Sciencx - Accessed . https://www.scien.cx/2026/05/11/day-4-leveling-up-with-lists-and-randomness-in-python-%f0%9f%90%8d/
IEEE
" » Day 4: Leveling Up with Lists and Randomness in Python 🐍." sheema | Sciencx [Online]. Available: https://www.scien.cx/2026/05/11/day-4-leveling-up-with-lists-and-randomness-in-python-%f0%9f%90%8d/. [Accessed: ]
rf:citation
» Day 4: Leveling Up with Lists and Randomness in Python 🐍 | sheema | Sciencx | https://www.scien.cx/2026/05/11/day-4-leveling-up-with-lists-and-randomness-in-python-%f0%9f%90%8d/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.