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

ProgramsLogic building

Phase 6 - Category 3: Loop & Conditional Mix

Combine loops and conditionals for complex logic.

10 programs · open one, then the next

Start with Print Primes 1 to N
  1. 01Print Primes 1 to NIntermediateList prime integers through an limit with Python. Students reuse a helper, include the endpoint, and distinguish a filtered list from a prime count or total.Open example →
  2. 02Sum of Primes in RangeIntermediateAdd all primes in an inclusive interval. Students reuse trial division and accumulate matching values rather than counting or printing each match separately.Open example →
  3. 03Count Composite NumbersIntermediateCount composite integers in a supplied interval with Python. Students require a number above one before negating a prime test and avoid calling one composite.Open example →
  4. 04Twin PrimesAdvancedFind twin-prime pairs with a fixed Python search. Students check both p and p plus two and understand the candidate bound and one-way pair generation.Open example →
  5. 05Goldbach Conjecture (Even as Sum of Two Primes)AdvancedSearch for a two-prime sum of an even number with Python. Students scan only one pair direction and distinguish checking an example from proving Goldbach.Open example →
  6. 06Prime Factors of NumberAdvancedList distinct prime divisors of a positive integer with Python. Students combine factor and prime tests and explain why repeated factors appear only once.Open example →
  7. 07Sum of Prime FactorsAdvancedAdd distinct prime divisors of an integer with Python. Students filter factor candidates and distinguish this sum from adding a repeated prime factorization.Open example →
  8. 08Numbers with Prime Number of FactorsAdvancedSelect numbers with a prime count of positive factors in Python. Students separate a candidate's divisor count from its own primality and reuse two helpers.Open example →
  9. 09Semi-Prime NumbersAdvancedFind semiprimes from one through one hundred using Python. Students search for two prime factors and allow the same prime twice in a valid product.Open example →
  10. 10Prime TripletsAdvancedPrint prime triples with offsets zero, two, and six in Python. Students test three related values and keep the largest member within the stated search bound.Open example →