Please ignore secret bonuses. Secret tests do NOT award bonus. Max hw grade is 30+2 bonus efficiency

Do you need help?

Notice Board

Per partecipare al corso di Fondamenti di programmazione 2023-24 loggatevi e attivatelo nella vostra pagina dei corsi preferiti. A quel punto il corso appare nel menù personale cliccando sul proprio avatar. Per i materiali degli anni precedenti seguite lo stesso metodo.

To join the Programming/Lab 2023-24 course, log-on and select it on the my courses page. It will appear on the personal menu of your avatar. For earlier years use the same method.

Can anyone confirm if the example part in the description is correct in HW6?

aryanahamed (7920 points)
6 12 67
in HW6 by (7.9k points)
closed by

When I do the rotations in each tile according to the following example, it only works for the 1st and 3rd tile of the first row. (I only tried the LFR part). But it didn't work for the 2nd tile or I don't understand the example. Please advise me on this. Thanks!

For example, comparing the image in test01_in.png with test01_exp.png
and considering the 20-pixel square tiles, it can be determined that
the rotations applied were
  - 'LFR' for the tiles in the first row,
  - 'NFF' for the tiles in the second row, and
  - 'FNR' for the tiles in the third row.
So the key to be returned will be: ['LFR', 'NFF', 'FNR'].

Edit: I didn't mention I did LFR in in every single tile. But, if I do L in the left most tile individually, it doesn't work for me unless I rotate the whole picture Left. 
195 views
closed

3 Answers

Best answer
AL1990 (28120 points)
3 6 142
by (28.1k points)
selected by

The second tile of the first row of the example test01_exp.png performs a flip F, a rotation of 180° to the right and is therefore upside down as shown in the image.

AL1990 (28120 points)
3 6 142
by (28.1k points)

Each string in the key represents the rotations of the tiles in a row of the image, each character of the string represents the single rotation of a tile and indicates its column.

For example: 'LFR' for the tiles in the first row means that the first tile of the first row performs a L rotation, the second tile performs a F rotation and the third tile performs a R rotation.

A
Andrea Catino (4720 points)
1 2 13
by (4.7k points)
The 3 strings in the example are all correct. I checked it myself, you can do this by opening "test01_in.png" and "test01_exp.png", you can see that the second tile in the first row needs to be rotated 180 degrees to be in the same expected position
AL1990 (28120 points)
3 6 142
by (28.1k points)
ATTENTION: the key is the sequence of rotations to be made to reconstruct the initial image, therefore L,F,R refer to the rotations you must make on the modified image to return to the original one. If you apply L (one left rotation or three right rotations) to the first left tile in the first row of the edited image, you will get the equivalent tile in the original image.