Founding Batch Offer · HLD · LLD · System Design at ₹799 until 30 Nov

ProgramsLogic building

Phase 2 - Level 5: Logical Loop Combinations

Combine loops with complex logic - filtering, conditional accumulation.

12 programs · open one, then the next

Start with Numbers with Even Digit Sum
  1. 01Numbers with Even Digit SumAdvancedFilter one through one hundred by an even digit sum with Python. Students combine an outer candidate loop, an inner digit loop, and a final remainder test.Open example →
  2. 02Count Numbers Divisible by 7 but Not 5AdvancedCount integers up to five hundred divisible by seven but not five. Students use and with a negated divisibility test and count matches rather than sum them.Open example →
  3. 03All Palindrome Numbers 1-500AdvancedFind every numeric palindrome from one through five hundred. Students rebuild each candidate's reverse and reset temporary values within the outer loop.Open example →
  4. 04Numbers with Digit Sum Multiple of 3AdvancedSelect numbers with digit sums divisible by three using Python. Students trace nested loops and compare a digit-based rule with direct number divisibility.Open example →
  5. 05Smallest & Largest DigitAdvancedTrack the smallest and largest digits with Python. Students update two running extremes, handle negative magnitudes, and treat zero as a real digit.Open example →
  6. 06Numbers with Even 1s in BinaryAdvancedPrint numbers whose binary form has an even count of ones. Students use Python bin, slicing, count, and a parity test that differs from even-number testing.Open example →
  7. 07Print i*i PatternAdvancedPrint a row of integer squares using Python. Students trace a one-line sequence, multiplication before output, and a newline separate from the number loop.Open example →
  8. 08Factorial of Each Number 1-NAdvancedCalculate and print a factorial for every integer through n. Students trace Python nested loops and reset each inner product before multiplying its factors.Open example →
  9. 09Sum of Odd & Even Digits SeparatelyAdvancedAdd odd digits and even digits into separate totals with Python. Students classify each extracted digit by parity rather than by its position in the number.Open example →
  10. 10Sum with Continue (Skip 0)AdvancedRead five integers and skip zero values with continue in Python. Students distinguish ending one iteration from ending a loop and trace a running input total.Open example →
  11. 11Sum of Squares of Even NumbersAdvancedSum squares of even numbers through a limit with Python. Students select terms with a stepped range, square each value, and build the running total.Open example →
  12. 12Count Primes in RangeAdvancedCount primes in an inclusive interval with nested loops. Students skip candidates below two, stop factor checks early, and increment a count only for primes.Open example →