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

ProgramsLogic building

Phase 2 - Level 1: Basic Looping

Master basic loops - for and while loops for iteration.

14 programs · open one, then the next

Start with Print Numbers from 1 to 10
  1. 01Print Numbers from 1 to 10BeginnerPrint one through ten with a for loop. Beginners trace range boundaries, repeated print calls, and the excluded stopping value without reading user input.Open example →
  2. 02Print All Even Numbers Between 1 and 100BeginnerGenerate even numbers from two through one hundred in Python. Students use a range step of two and learn why the stop must be beyond the final desired value.Open example →
  3. 03Sum of First N Natural NumbersBeginnerAdd the first n natural numbers using a Python accumulator. Beginners trace a running total, the inclusive upper bound, and what an empty loop leaves behind.Open example →
  4. 04Print the Factorial of a Given NumberBeginnerCompute factorial with a multiplication loop. Students follow the initial value one, included factors, zero factorial, and the need to reject negative inputs.Open example →
  5. 05Print All Odd Numbers Between 1 and 100BeginnerList odd numbers below one hundred using range. Beginners compare start, stop, and step and check the last printed value without an extra parity condition.Open example →
  6. 06Print Numbers from 10 Down to 1BeginnerCount backward from ten to one with Python range. Students trace a negative step, an excluded lower stop, and why the direction of a range must match its step.Open example →
  7. 07Print Multiplication TableBeginnerBuild a ten-row multiplication table from an entered integer. Students use range, a temporary result, and formatted output that labels every multiplication.Open example →
  8. 08Sum of All Even Numbers Up to NBeginnerSum even integers no greater than an entered limit in Python. Beginners trace a stepped range, a zero accumulator, and limits that may be odd or below two.Open example →
  9. 09Sum of All Odd Numbers Up to NBeginnerAdd odd integers from one up to a supplied limit with Python. Students trace a two-step range and compare an accumulated total with printing individual numbers.Open example →
  10. 10Product of Digits with a Basic While LoopBeginnerMultiply a number's digits using a basic while loop. Students trace abs, remainder, floor division, and the zero case that needs a separate initial value.Open example →
  11. 11Count Numbers Divisible by 3BeginnerCount integers divisible by three between one and n with Python. Students separate a match counter from a total and use modulo inside a bounded for loop.Open example →
  12. 12Print Multiples of 5 Up to NBeginnerPrint multiples of five up to a chosen limit in Python. Beginners follow a stepped range and learn how end changes spacing while a final print ends the line.Open example →
  13. 13Sum of Squares Up to NBeginnerAccumulate the squares of one through n using Python. Students distinguish squaring each term from squaring a total and trace a running sum through the loop.Open example →
  14. 14Print Alternating NumbersBeginnerPrint positive odd values and negative even values through n. Students trace parity-based output choices without changing the loop's ascending control value.Open example →