Day 13 of my Python Full-Stack Journey 🐍 Today, Python taught me how to make decisions. 🤔 Conditional statements — if, elif, and else — are the brain of any program. Before today, my code just ran in a straight line. Now it can think. Here's something I built today: python score = 85 if score >= 90: print("Grade: A 🏆") elif score >= 75: print("Grade: B ✅") elif score >= 60: print("Grade: C 📘") else: print("Grade: F — Keep going! 💪") Simple? Yes. But this tiny block of logic is the foundation of every login system, recommendation engine, and decision-making app you've ever used. Key things I learned today: → if checks the first condition → elif handles multiple possibilities → else catches everything else → Indentation in Python isn't just style — it's syntax → You can even nest conditions inside conditions (carefully!) The biggest mindset shift? Realizing that writing code is really just teaching a computer how to think in scenarios — just like we do every day. 13 days in. Still showing up. 🔥 What was the concept that clicked for you when you were learning to code? Drop it below 👇 #Python #100DaysOfCode #FullStackDeveloper #LearningInPublic #CodingJourney #PythonProgramming #TechCommunity #Day13
Learning Conditional Statements in Python with If, Elif, and Else
More Relevant Posts
-
Day 18 of my Python Full-Stack Journey — The for Loop 🔁 Today I dove deep into one of Python's most powerful and elegant features — the for loop. What made it click for me: Unlike other languages where for loops are mostly about counting, Python's for loop is about iterating over anything — lists, strings, dictionaries, ranges, even custom objects. Here's what I explored today: ✅ Looping over lists, strings, and ranges ✅ Using enumerate() to get index + value together ✅ Looping through dictionaries with .items() ✅ Nested for loops ✅ List comprehensions — a cleaner, Pythonic way to loop ✅ break and continue to control loop flow ✅ The else clause in a for loop (yes, that's a thing!) My biggest takeaway? Python's for loop isn't just a loop — it's a mindset. It pushes you to think in terms of collections and iteration rather than indexes and counters. That shift alone makes your code cleaner and more readable. One line that blew my mind today: pythonsquares = [x**2 for x in range(1, 11)] That's a full loop compressed into one beautiful line. 🤯 Still 82 days to go, and every day feels like unlocking a new superpower. If you're also learning Python or on your own coding journey, drop a comment — let's grow together! 🚀 #Python #100DaysOfCode #FullStackDevelopment #Coding #LearningInPublic #Day18 #PythonForBeginners #WebDevelopment
To view or add a comment, sign in
-
-
Day 14 of My Python Full-Stack Journey: The elif Statement! 🐍 After mastering if and else, today I leveled up with elif — Python's way of checking multiple conditions without writing nested if statements everywhere. The concept is simple but powerful: instead of checking just "this or that," you can now check "this, or this, or this, or finally that." It keeps your logic clean, readable, and efficient. What I learned today: Writing multiple elif blocks lets Python evaluate conditions top to bottom and stop as soon as one is true — meaning order actually matters! A small but important insight that changes how you think about writing conditions. A quick example that clicked for me: python score = 85 if score >= 90: print("Grade: A") elif score >= 80: print("Grade: B") elif score >= 70: print("Grade: C") else: print("Grade: F") Clean. Readable. No messy nesting. That's the beauty of elif. Key takeaway: elif is not just a shortcut — it's a mindset shift toward writing decision logic that mirrors how we think in real life. 14 days in and every concept feels like a new superpower. Excited to keep building! 💪 #Python #100DaysOfCode #FullStack #LearningInPublic #PythonProgramming #CodingJourney #Day14
To view or add a comment, sign in
-
-
Day 26 of My Python Full-Stack Journey — Finding the Nth Prime Number 🔢 Today I tackled a classic algorithmic challenge: writing a program to find the Nth prime number. It sounds simple, but it pushed me to think about efficiency — the difference between a brute-force check and an optimized approach using early termination and square root logic is huge when N gets large. Key concepts I reinforced today: → What makes a number prime (divisible only by 1 and itself) → Looping and counting logic in Python → Optimizing trial division using math.sqrt() → Writing clean, readable functions A simple is_prime() helper + a counter loop gets you there, but understanding why you only check up to √n is where real problem-solving kicks in. Snippet from today: python import math def is_prime(n): if n < 2: return False for i in range(2, int(math.sqrt(n)) + 1): if n % i == 0: return False return True def nth_prime(n): count, num = 0, 1 while count < n: num += 1 if is_prime(num): count += 1 return num print(nth_prime(10)) # Output: 29 Every small program like this is building the logical foundation I'll need for the full-stack projects ahead. 💪 26 days in — consistency is the real algorithm. 🔥 #Python #100DaysOfCode #FullStackDevelopment #CodingJourney #Day26 #Programming #LearnToCode #PythonProgramming
To view or add a comment, sign in
-
-
🚀 Day 19 of My Python Full-Stack Journey — Introduction to Operators 🐍 Today I explored one of the fundamental building blocks of programming — Operators in Python. At first, operators seemed simple. But as I went deeper, I realized they are the core of how programs make decisions, perform calculations, and compare values. Here’s what I learned today: 🔹 Arithmetic Operators Used for mathematical calculations + - * / % // ** From basic addition to exponentiation — Python makes math clean and readable. 🔹 Comparison Operators Used to compare values == != > < >= <= These are the backbone of conditional statements like if and elif. 🔹 Logical Operators and or not These help combine multiple conditions — making programs smarter and more dynamic. 🔹 Assignment Operators = += -= *= /= Efficient ways to update variables without rewriting long expressions. 🔹 Membership & Identity Operators in, not in, is, is not Small operators, but very powerful when working with collections and objects. 💡 What clicked for me today: Operators are not just symbols — they are the language that tells Python how to think. Every calculation, every decision, every condition in a program depends on operators. Step by step, concept by concept — building a strong foundation. On to Day 20! 🚀🔥 #Python #FullStackJourney #LearningInPublic #100DaysOfCode #Programming #DeveloperJourney
To view or add a comment, sign in
-
-
Day 14 – Exploring Built-in Functions & Python Standard Libraries Day 14 was focused on understanding how Python makes our work easier through built-in functions and standard libraries. Instead of writing everything from scratch, I explored how to use ready-made tools effectively and correctly. What I learned and practiced today: Built-in Functions: Used pow(), sum(), max(), and min() for basic computations Practiced rounding values using round() with positive and negative precision Understood how these functions accept parameters and return results Math Module (math): Calculated factorials and square roots Worked with constants like pi and e Used trigonometric functions such as sin() (with radians) Explored mathematical helpers: ceil(), floor(), trunc() fabs() for absolute values log() and log10() for logarithmic calculations Random Module (random): Generated random numbers using: random() for floats randint() for integers uniform() for float ranges Selected random elements using choice() and sample() Shuffled lists using shuffle() and observed in-place modification behavior Collections Module (Counter): Used Counter to count occurrences of elements in a list Learned how it efficiently tracks frequency of unique values Key Takeaways: Python’s standard libraries save time and reduce code complexity Understanding return values and in-place operations is important Libraries are powerful only when used with proper understanding Every day, I’m getting more comfortable with Python’s ecosystem and learning how to write cleaner and smarter code. Hashtags #Python #PythonLibraries #BuiltInFunctions #MathModule #RandomModule #Collections #Counter #DailyLearning #ProgrammingBasics #CodingJourney
To view or add a comment, sign in
-
🚀 Day 111 – Perfect Number Checker in Python Today, I implemented a Perfect Number Checker using Python 🐍 A Perfect Number is a number that is equal to the sum of its proper divisors (excluding the number itself). For example: 👉 6 is a perfect number Divisors of 6 → 1, 2, 3 Sum → 1 + 2 + 3 = 6 ✅ 💻 What I Built ✔ Created a function perfect_num(n) ✔ Used a loop to find divisors ✔ Calculated the sum of proper divisors ✔ Compared the sum with the original number ✔ Returned whether it is a perfect number or not 🧠 Key Concepts Used Functions For loops Conditional statements Modulus operator (%) Logical comparison 📌 Sample Output perfect_num(6) → Perfect Number ✅ perfect_num(123) → Not a Perfect Number ❌ 🎯 What I Learned How mathematical concepts can be translated into logic Importance of clean function structure Writing reusable and readable code Consistency > Motivation 💪 Every day I’m improving my problem-solving skills step by step. #Day111 #Python #CodingJourney #ProblemSolving #100DaysOfCode Rudra Sravan kumar Sagar Bomburi 10000 Coders
To view or add a comment, sign in
-
-
Day 24— Functions in Python Today I hit one of the most satisfying milestones in my Python journey: writing my first real functions. Before this, I was copy-pasting the same logic in multiple places. Today, I learned how to define it once — and call it everywhere. Here's the simple example that made it click for me: def greet(name): return f"Hello, {name}! Welcome to Python learning." message = greet("Shreya") print(message) output:Hello, Shreya! Welcome to Python learning. That one small block taught me 4 powerful ideas: → def — how to declare a function → Parameters — placeholders that accept any input → return — sending a result back to the caller → Reusability — write once, use as many times as you need Functions aren't just a syntax feature. They're a mindset shift — from writing code that runs once to writing code that works for you repeatedly. And the best part? Every complex Python program you'll ever see is built on this same foundation. hashtag #Python #PythonLearning #CodingJourney
To view or add a comment, sign in
-
-
🚀 Day 12 | Exception Handling in Python ⚠️ Every strong application starts with handling errors gracefully. In today’s notebook / carousel, I explored how Python manages errors and how we can convert technical crashes into clean, user-friendly experiences. 📌 In today’s learning, I covered: ✔ Purpose of Exception Handling ✔ Types of Errors (Compile-time, Logical, Runtime) ✔ What Exceptions actually are in Python ✔ Built-in vs User-Defined Exceptions ✔ try, except, else, finally, raise keywords ✔ Various forms of except blocks ✔ Standard exception handling flow ✔ Custom Exception development ✔ Using raise for project-specific rules What stood out most to me is this: Exception handling isn’t just about avoiding crashes — it’s about writing robust, production-ready code that protects user experience and keeps applications stable. Understanding how Python’s PVM reacts to errors, how control flow changes, and how custom exceptions model real-world business rules gave me a deeper engineering perspective beyond basic coding. 🙏 Grateful to my mentor Nallagoni Omkar Sir for guiding me through these fundamentals with clarity and practical understanding. 📌 Part of my learning-in-public journey — building strong Python foundations step by step. 👉 Next up: File Handling & Working with Files in Python 📂 #Python #ExceptionHandling #CorePython #DataScienceJourney #LearningInPublic #ProgrammingFundamentals #PythonDeveloper #StudentOfDataScience #NeverStopLearning
To view or add a comment, sign in
-
Python Project: Simple Calculator 🖥️ In this video, I create a basic calculator in Python from scratch! 🔢💡 I recorded the entire process so you can see how to code, test, and fix errors step by step. 💻 What you’ll learn in this video: How to take user input in Python Perform basic math operations: addition (+), subtraction (-), multiplication (*), division (/), and modulo (%) Handle errors like division by zero Tips to practice Python coding and improve your skills 🔥 Practice Makes Perfect: Keep coding, experimenting, and learning from mistakes — that’s how you grow as a programmer! 💬 Motivation Quote: "Don’t just learn to code, code to learn. Every mistake is a step closer to mastery." 📌 Next Steps: Stay tuned! Tomorrow, I’ll create a To-Do List in Python, and later, I’ll merge both projects into one powerful program! #PythonProjects #PythonCalculator #LearnPython #CodingPractice #Motivation
To view or add a comment, sign in
-
#Day 47 of My Python & DSA Journey Today I solved the “Check if Binary String Has at Most One Segment of Ones” problem on LeetCode. 🔍 Problem Overview: Given a binary string containing only 0s and 1s, the task is to determine whether the string contains at most one continuous segment of 1s. If multiple separated segments of 1s exist, the result should be False. 🧠 Approach: I iterated through the string and tracked how many times a new segment of 1s starts. Whenever a 1 appears either at the beginning of the string or immediately after a 0, it indicates the start of a new segment. If more than one such segment is found, the condition fails. ⚡ Key Takeaways: • Strengthened understanding of string traversal • Practiced pattern recognition in binary strings • Improved logical problem-solving using Python 📊 Complexity: • Time Complexity: O(n) • Space Complexity: O(1) Consistently solving problems helps me improve my algorithmic thinking and coding efficiency every day. Looking forward to learning more and solving tougher challenges ahead! Under the Guidance of : Rudra Sravan kumar and Manoj Kumar Reddy Parlapalli #Day47 #Python #LeetCode #DataStructures #Algorithms #CodingJourney #ProblemSolving #100DaysOfCode
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