Day 4/100: Randomness and Data Structures in Python! Today was an exciting day! I shifted from simple variables to Lists, which allowed me to manage collections of data efficiently. I also explored how to make programs unpredictable using the Random module. What I mastered today: The random Module: Generating random integers and floats to create dynamic experiences. Python Lists: Learning how to store, access, and organize data. List Methods: Mastering .append() to add items and .extend() to combine lists. Offset & Indexing: Accessing specific items (and avoiding the famous "Index Out of Range" error!). Daily Project: Rock Paper Scissors Game I built a fully functional Rock Paper Scissors game where the user plays against the computer. It was a great way to combine if-else logic with random.randint(). Check out my code and progress here: https://lnkd.in/eYp3jYs7 #Python #100DaysOfCode #DataStructures #CodingJourney #RockPaperScissors #Programming
Mastering Lists and Randomness in Python
More Relevant Posts
-
Day 10 of my Python journey Missed the class, but caught up stronger Today’s focus: Lists & Real-world Logic ✔ Built a mini time converter (24hr → 12hr format) ✔ Understood list basics & nested indexing ✔ Explored list methods (append, extend, remove, pop) ✔ Learned the power of mutable data structures Big takeaway: Lists are not just storage — they’re powerful tools for solving real problems. Code link : https://lnkd.in/gTjGZd5X Consistency continues 🚀 #Python #100DaysOfCode #CodingJourney #FullStackDeveloper Codegnan Saketh Kallepu
To view or add a comment, sign in
-
🎮 Rock Paper Scissors – Python Another step forward in my Python learning journey. This time I built a Rock Paper Scissors game in Python where the user plays against the computer in the terminal. The game keeps track of the score, validates user input, and allows the player to continue playing multiple rounds. I also focused on making the interaction smoother by guiding the user whenever an invalid input is entered. 🧠 Concepts practiced in this project: • Python lists • Conditional logic • While loops • Random module • Input validation and user interaction 🎮 Try the game: 🔗 Live Demo (Replit): https://lnkd.in/gwJ6C9tP 💻 GitHub Repository: https://lnkd.in/gjkJwvEX Always learning, one small program at a time. 💻 #Python #CodingJourney #LearningToCode #BeginnerProgrammer #100DaysOfCode
To view or add a comment, sign in
-
🐍 Python Journey — Lab 2 Complete! After sharing my first Python lab, I'm back with Lab 2: Python Basic Data Types & Fundamental Concepts! 🎉 Here's what I explored this time: ✅ Built-in Data Types — str, int, float, bool, list, dict & more ✅ Strings — f-strings, slicing, concatenation & immutability ✅ Numbers — integers, floats, exponents & the float precision quirk (0.1 + 0.2 😅) ✅ Boolean & Truthy/Falsy values ✅ Type Conversion — int(), float(), str(), bool() ✅ Constants by convention in Python 💡 One thing that surprised me? Python strings are immutable — you can't change a character directly, you have to build a new string! Every lab is building my foundation stronger. 30 practice questions later, I feel more confident than ever. 💪 Lab 3 is coming soon — stay tuned! 🚀 #Python #Programming #CodingJourney #PythonBasics #LearningPython #UniversityOfLahore #Tech #StudentLife
To view or add a comment, sign in
-
While revisiting Python fundamentals, I implemented a simple Hangman game in Python. The goal was to strengthen my understanding of core programming concepts such as: • Functions and modular program structure • Loops and conditional logic • Managing program state (correct vs missed guesses) • Handling user input and duplicate guesses • Implementing win/lose logic One interesting challenge was detecting the win condition for words with repeated letters (e.g., APPLE). I solved this by comparing the unique letters in the secret word with the letters guessed by the player. Code available on GitHub: https://lnkd.in/gbkT8FAj Small exercises like this are a great way to reinforce programming logic before applying Python to more complex data analysis and modeling problems. #Python #Programming #DataScience #CodingJourney #LearnInPublic
To view or add a comment, sign in
-
Strings are everywhere in Python - file names, user input, APIs, data cleaning, logs. If you work with Python, these 10 string methods aren’t optional — they’re daily tools. You’ll use them for: - cleaning extra spaces. - checking file extensions. - splitting and joining data. - finding and counting characters. These methods help you write cleaner, shorter, and more readable code. If you ever forget the syntax, this one image is enough to refresh your memory. 📌 Save it — future you will thank you. #Python #LearnPython #PythonTips #Programming #Coding #SoftwareEngineering #PythonDeveloper
To view or add a comment, sign in
-
-
Strings are everywhere in Python - file names, user input, APIs, data cleaning, logs. If you work with Python, these 10 string methods aren’t optional — they’re daily tools. You’ll use them for: - cleaning extra spaces. - checking file extensions. - splitting and joining data. - finding and counting characters. These methods help you write cleaner, shorter, and more readable code. If you ever forget the syntax, this one image is enough to refresh your memory. 📌 Save it — future you will thank you. #Python #LearnPython #PythonTips #Programming #Coding #SoftwareEngineering #PythonDeveloper
To view or add a comment, sign in
-
-
Learning namespaces and decorators in Python today, and it changed the way I think about how Python organizes code. Namespaces helped me understand how Python keeps variables and functions separated to avoid conflicts. The LEGB rule (Local → Enclosing → Global → Built-in) made it much clearer how Python decides where to look for a variable. Then I explored decorators. At first they looked confusing, but they’re actually a powerful way to modify the behavior of a function without changing the function itself. For example, adding logging, timing execution, or access control becomes much cleaner with decorators. Small concepts like these make Python feel much more elegant once they click. Currently focusing on improving my fundamentals in Python and machine learning, one concept at a time. #Python #Programming #LearningInPublic #100DaysOfCode #MachineLearning
To view or add a comment, sign in
-
📌 Creating NumPy Arrays NumPy arrays can be created from Python lists and nested lists. 🔹 From a Python List my_list = [1,2,3] np.array(my_list) This converts the list into a NumPy array. 🔹 From a Matrix (Nested List) my_matrix = [[1,2,3],[4,5,6],[7,8,9]] np.array(my_matrix) This creates a 2D NumPy array (matrix). Using lists and nested lists is one of the simplest ways to create arrays in NumPy. #Python #NumPy #DataAnalytics #Programming #LearningPython
To view or add a comment, sign in
-
Learning a new framework always feels easy… until you build a real project. Python Shiny is powerful for building data apps, but the moment you add real data, reactive logic, and user interactions, things get interesting quickly. Still, that's where the real learning happens. Every real project teaches more than ten tutorials ever could. #Python #DataScience #PythonShiny #Analytics #Programming #LearningByDoing
To view or add a comment, sign in
-
Explore related topics
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development