Nested loops coding challenges

Practise nested loops with 5 coding challenges, from easy to hard. Every challenge runs in your browser with instant tests, an AI review of your code and community solutions to compare.

Easy · 5

Skills you'll practise: 2D listsAvoiding double countsBuilding stringsCounters across rowsEdge detectionGrowing rowsPaddingPairs of indexesRow and column indexesString patterns
  • Python · C++ · C#
  • Automated tests
  • AI code review
  • Community solutions
226
Challenges
2
Solutions shared
3
Languages

All challenges

Search by topic, language, or difficulty.

5 challenges
Easy

Count Pairs With a Sum

Count pairs of positions whose values add up to a target.

You'll learn Pairs of indexesAvoiding double counts
ArraysBeginnerLearning-pathNested-loops
No solutions yet
Easy

Number Triangle

Build a triangle of increasing numbers.

You'll learn Growing rowsCounters across rows
BeginnerLearning-pathNested-loopsPatterns
No solutions yet
Easy

Pyramid Rows

Draw a right-aligned pyramid of # blocks.

You'll learn String patternsPadding
BeginnerLearning-pathNested-loopsPatterns
No solutions yet
Easy

Hollow Square

Draw the outline of a square with * characters.

You'll learn Edge detectionBuilding strings
BeginnerLearning-pathNested-loopsPatterns
No solutions yet
Easy

Multiplication Grid

Build a full multiplication table.

You'll learn 2D listsRow and column indexes
BeginnerLearning-pathNested-loops
No solutions yet