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 numbers from 1 to 10 using a loop.Open example →
  2. 02Print All Even Numbers Between 1 and 100BeginnerPrint all even numbers from 1 to 100.Open example →
  3. 03Sum of First N Natural NumbersBeginnerPrint the sum of first n natural numbers.Open example →
  4. 04Print the Factorial of a Given NumberBeginnerCalculate and print the factorial of a number.Open example →
  5. 05Print All Odd Numbers Between 1 and 100BeginnerPrint all odd numbers from 1 to 100.Open example →
  6. 06Print Numbers from 10 Down to 1BeginnerPrint numbers from 10 down to 1.Open example →
  7. 07Print Multiplication TableBeginnerPrint the table of a given number (n × 1 to n × 10).Open example →
  8. 08Sum of All Even Numbers Up to NBeginnerPrint the sum of all even numbers up to n.Open example →
  9. 09Sum of All Odd Numbers Up to NBeginnerPrint the sum of all odd numbers up to n.Open example →
  10. 10Product of DigitsBeginnerPrint the product of digits of a given number.Open example →
  11. 11Count Numbers Divisible by 3BeginnerCount numbers from 1 to n that are divisible by 3.Open example →
  12. 12Print Multiples of 5 Up to NBeginnerPrint all multiples of 5 from 5 to n.Open example →
  13. 13Sum of Squares Up to NBeginnerCalculate sum of squares from 1² to n².Open example →
  14. 14Print Alternating NumbersBeginnerPrint numbers 1 to n with alternating signs.Open example →