Unit 2 Task 37: Guess the product

Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.

Unit 2 Task 37 - Guess the product

← Unit 2 tasks · Solution


The computer picks two secret numbers A and B from 1 to 10. The player tries to guess A × B.

Loop until the guess is correct. Each wrong guess should say too low or too high compared to the real product.

Skills: random, while, comparisons.