Python Learning Journey – 🚀 Today’s focus was on control flow statements that make loops smarter and more efficient. Instead of just running loops, I practised how to control their behaviour using break, continue, and pass. Here’s what I worked on: • Used break to stop execution when a condition is met (sum exceeding a limit) • Used continue to skip specific iterations (printing only odd numbers) • Used 'pass' as a placeholder in conditional statements • Combine break and continue in a real scenario (processing a word list with conditions) These concepts helped me understand how to write more optimised and controlled logic in Python programs. Every day, getting better at thinking logically and writing cleaner code. Big thanks to VASU KUMAR PALANI and PythonLife for the continuous guidance and support. #Python #CodingJourney #LearnInPublic #PythonBasics #Programming #Consistency #TechSkills
Mastering Python Control Flow with Break, Continue, and Pass
More Relevant Posts
-
Day 35 of python learning journey Today’s Python topic: Types of Patterns 👩💻🔥 Practiced how to build logic using patterns. As shown in the image, I covered 4 main types: 1. Star Patterns → Using `*` to create shapes like triangles and pyramids. Helps understand loops and spacing. 2. Number Patterns→ Arranging numbers in increasing or decreasing order. Builds strong logical thinking. 3. ABC Patterns → Printing alphabets A, B, C in order. Great for understanding sequences. 4. Pyramid Patterns → Centered shapes using spaces + symbols. Best way to learn alignment and indentation. Why patterns matter: They improve programming skills, help with loops, build logic, and are super useful in coding interviews. Bottom line from today: *Patterns = Practice + Logic + Creativity* Special thanks to the CEO G.R NARENDRA REDDY Sir for constant guidance and motivation. #Python #PatternProgramming #Loops
To view or add a comment, sign in
-
-
Python Learning Journey – Day 5 🚀 Loops are where logic starts to feel powerful. Today, I focused on applying for and while loops to solve real problems instead of just learning syntax. Here’s what I built: • Calculated sum of squares (1 to 5) • Created a countdown program using while loop • Printed multiplication tables using nested loops • Found sum of even numbers in a range • Calculated sum from 1 to n • Iterated through lists efficiently • Printed custom ranges (-10 to -1) • Generated cubes of numbers Each problem improved my understanding of iteration, control flow, and writing cleaner logic. Consistency matters more than speed. One step every day. Big thanks to VASU KUMAR PALANI and PythonLife for the continuous learning support. #Python #CodingJourney #LearnInPublic #PythonLoops #Programming #Consistency #TechSkills
To view or add a comment, sign in
-
-
Taking input and printing output on console in python:--- Learn = input( "what programming language your learning:") print("Egarly Learning", Learn) Converting string input to number(integers ):- Count = int(input("How many times you want to read python:")) print ("want to read:", Count) if we want to take floating numbers :- temp = float(input ("what is the temperature outside now:")) print("outside temperature is:-", temp) #learn #python #beginner #content #creator #dream
To view or add a comment, sign in
-
🚀 Day 5 of My Python Learning Journey I’ve been consistently learning Python for the past few days, and here’s what I’ve covered so far: ✅ Python Basics (Variables, Input, Data Types) ✅ Conditional Statements ✅ Loops (for, while) ✅ Pattern Problems ✅ Functions & Lambda Functions 💡 Some things I built: Palindrome Checker Prime Number Checker Factorial Calculator Pattern Printing Programs Sum of Digits & Number Reversal 📌 Biggest Learning: Writing logic is more important than just knowing syntax. Small mistakes (like wrong loop conditions) can completely change output. I’m documenting everything on GitHub and improving every day. #Python #LearningInPublic #AI #MachineLearning #CodingJourney
To view or add a comment, sign in
-
🚀 Day 5 of Python Learning: Loops in Python Today I learned how to repeat tasks using loops — one of the most powerful concepts in programming. 🔹 What are Loops? Loops help us execute a block of code multiple times without writing it again and again. 🔸 For Loop Used when the number of iterations is known. Example: for i in range(1, 6): print(i) 🔸 While Loop Used when the number of iterations is not known. Example: i = 1 while i <= 5: print(i) i += 1 🔸 Loop Control Statements ✔ break → Stops the loop completely ✔ continue → Skips current iteration ✔ pass → Does nothing (placeholder) 💡 Key Learning: Use "for loop" for fixed iterations and "while loop" for condition-based execution. 🧪 Practice Task: Print numbers from 1 to 10 using a loop Find factorial of a number 🎯 Interview Question: What is the difference between for loop and while loop? Answer: "For loop is used when the number of iterations is known, while loop is used when the condition decides the execution." #Python #Learning #CodingJourney #Day5 #Programming #SDET Masai #dailylearning #masaiverse #SDET
To view or add a comment, sign in
-
-
🚀 Day 11 of Python Learning: Loops and Patterns in Python Today I practiced loops in Python and learned how to create patterns using nested loops. This helps improve logic building and problem-solving skills. 🔹 What are Patterns? Patterns are shapes or number/star designs created using loops. They are great for understanding loop control and nested loops. 🔸 Using For Loop for i in range(5): print("*") 🔸 Star Pattern Example for i in range(1, 6): print("*" * i) Output: * ** 🔸 Number Pattern Example for i in range(1, 6): for j in range(1, i + 1): print(j, end=" ") print() 💡 Key Learning: Nested loops are useful when one loop runs inside another loop, especially for patterns and matrix-style problems. 🧪 Practice Task: ✔ Print reverse star pattern ✔ Print square pattern using stars ✔ Print number triangle pattern ✔ Try same patterns using while loop 🎯 Interview Question: What is a nested loop in Python? Answer: A nested loop is a loop inside another loop. It is used when repeated iterations are needed within each cycle of the outer loop. 📌 Day 11 completed — logic building step by step! #Python #Learning #CodingJourney #Day11 #Programming #SDET #100DaysOfCode Masai #dailyleaning #masaiverse
To view or add a comment, sign in
-
🚀 Day 6 of Python Learning: Functions in Python Today I learned how to organize and reuse code using functions — a key concept for writing clean and efficient programs. 🔹 What is a Function? A function is a block of code that performs a specific task and can be reused whenever needed. 🔸 Creating a Function Example: def greet(): print("Hello, welcome to Python!") greet() 🔸 Function with Parameters Example: def greet(name): print("Hello", name) greet("Rohit") 🔸 Function with Return Value Example: def add(a, b): return a + b result = add(5, 3) print(result) 💡 Key Learning: Functions help reduce code repetition and make programs more structured and readable. 🧪 Practice Task: Create a function to check even or odd Create a function to add two numbers Create a function to find the square of a number 🎯 Interview Question: What is the difference between return and print in Python? Answer: "print displays output on the screen, while return sends the value back to the function caller." #Python #Learning #CodingJourney #Day6 #Programming #SDET Masai #dailylearning #masaiverse #SDET
To view or add a comment, sign in
-
-
📘 Python Learning – Day 4 Highlights 🐍 Today’s class was about Lists & Basic List Operations — super useful for handling multiple data! 🔹 What is a List? An ordered, changeable collection that allows duplicates 🔹 Accessing Data: Indexing & slicing (list[0], list[1:4]) 🔹 List Operations: ✔ Add → append(), insert() ✔ Remove → remove(), pop(), clear() 🔹 Built-in Functions: len(), sum(), max(), min(), sort(), reverse() 🔹 Practice Program: Created a simple menu-driven program to add, remove, and display list items 💡 Lists make data handling easier and more dynamic in Python Step by step, getting more comfortable with coding 🚀 #Python #Programming #Coding #LearningJourney #Beginner #TechSkills
To view or add a comment, sign in
-
-
Python Journey — Day 19 | Recursion & Sorting Algorithms | 10000 Coders Today I explored recursion concepts and implemented important sorting algorithms, which helped me understand deeper logic in programming. Problems I solved : • Print numbers from 1 to N using recursion • Print numbers from N to 1 • Sum of first N numbers • Factorial using recursion • Reverse a number • Count digits in a number • Sum of digits • Palindrome check (number & string) • Find factors of a number • Prime number check • Armstrong number check Major focus today: • Insertion Sort implementation • Quick Sort implementation I implemented these sorting techniques using pure logic to understand how elements are arranged step by step Today's learnings: Understanding recursion and how functions call themselves Breaking problems into smaller subproblems Learning efficient sorting techniques like Quick Sort Strengthening logic with insertion sort shifting concept Improving problem-solving with recursive thinking Today felt important as I started learning advanced concepts like recursion and efficient sorting algorithms. #Python #PythonDeveloper #Programming #Coding #LearningJourney #ProblemSolving #Recursion #SortingAlgorithms #QuickSort #InsertionSort #CodeEveryDay #FutureDeveloper #KeepLearning
To view or add a comment, sign in
-
Python Journey — Day 18 | Lambda Functions & Sorting Algorithms Today I explored lambda functions and implemented classic sorting algorithms, which felt like a big step towards core programming concepts. Problems I solved : • Add two numbers using lambda • Find square of a number • Check even or odd using map and lambda • Get last character of a string • Extract values from list of tuples • Filter even numbers from a list • Convert list to squares using map • Find maximum of two numbers • Use reduce with lambda for product • Lambda inside a function Major focus today: • Bubble Sort implementation • Selection Sort implementation I implemented sorting algorithms using pure logic to understand how data is arranged step by step instead of relying on built-in methods. Today's learnings: Understanding lambda functions and anonymous functions Using map and reduce effectively Learning how sorting algorithms work internally Strengthening nested loop concepts through sorting Improving problem-solving with step-by-step logic Today felt important as I started learning core concepts like sorting which are widely used in real applications. On to Day 19 #Python #PythonDeveloper #Programming #Coding #LearningJourney #ProblemSolving #SortingAlgorithms #BubbleSort #SelectionSort #CodeEveryDay #KeepLearning
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
Smarter loops for better logic! 💎 Your breakdown of control flow is so clear and sweet. ✨🚀