📌 Day 6 of My #50DaysOfPython Challenge 🐍 Today’s task was to check whether a number is Prime or Not. 🔢 A prime number is a number greater than 1 that has no divisors other than 1 and itself. This concept strengthened my understanding of loops, conditional logic, and flag variables in Python. 🧠 What I Learned: 🔹 How to use a flag variable → A flag is like a status indicator that stores a True/False condition. → Example: We assume a number is prime (True) and change the flag if it isn’t. 🔹 How to optimize loops by checking only up to √n 🔹 Logical thinking and condition-based decisions Every line of code teaches something new 💪 On to Day 7 tomorrow! 🚀 #Python #CodingChallenge #50DaysOfPython #ProblemSolving #WomenInTech #LogicBuilding #LearnToCode

To view or add a comment, sign in

Explore content categories