Challenge 19

*️⃣

Multiplication Table

Open in Code Editor or Copy Instructions
...solutions at bottom of page...

Create a procedure to take in a value representing the size of the grid

Examples:

An input of 10 would create a 10x10 multiplication table, like this https://dctqed2pc42y2.cloudfront.net/overleaf-assets/images/multiplication-table.svg

You will have to be careful with formatting - since numbers will different numbers of digits will have different widths in the grid

Extension:

Modify the procedure to allow the user different options - e.g. only outputting multiples of 5, either even or odd numbers, only outputting square numbers, primes, numbers that, in binary, have an equal number of 0s and 1s etc. Can you notice any geometric patterns when you do this?

Solutions

A-Level 9618