Daily Challenge #6

This time another riddle. I think this is a good way to learn to read code.

The input has to be an integer. If you put for instance 3.5 the bit behind the dot will be removed by the floor block.

  • What does it do?
  • What could you change to make the result more random?
  • Could you make the result in a completely different way?
  • Can you think of any use for this procedure?

7 Likes

No one?

Well let me show you the outcome of the procedure.

If you for example enter 3 you get the following result

3,3,3
3,3,3
3,3,3

If you enter 5 then you get

5,5,5,5,5
5,5,5,5,5
5,5,5,5,5
5,5,5,5,5
5,5,5,5,5

Question was also can you make it more random. Then you have to exchange one block for a few others.

When you give 3 as input you could get

2,7,5
8,9,2
2,3,6

or if you give 4 as input you could get

1,9,4,3
7,6,1,5
4,8,8,9
6,1,3,2

Now the question is and i hope you can think of one. What could you do with such a square of numbers?

2 Likes

Firstly looks good! Secondly, you can generate a random number, from 1*n to 9*n.

1 Like

And what would be a use for that?

Education. Actually IDK.

Haha, much busy is my apps and working up to 16 hours on kodular daily, so ignoring riddles because my apps have a lot of riddles for me to solve … haha

1 Like

You could make games with such a grid of numbers. Replace the numbers through image for instance. Or use the replacing images to generate random art.

3 Likes

Taken from Ascii Text / Signature Generator
1 Like