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.

HW2-rec expected output error

1
1980480 (4210 points)
2 5 7
in HW2 by (4.2k points)
closed by
Hello,

when doing the tests of the HW2-rec, I get an error for the first 2 example tests that seems strange, because if I use a tuple of lists as output, It doesn't occur, but if I use a list of lists, It occurs. It seems strange because, lf l'm not wrong, the expected output in the test_01.py should be a list of lists ...
181 views
closed with the note: solved

1 Answer

andrea.sterbini (207940 points)
756 1270 2377
by (208k points)
The expected output is tuple of lists.

In the json tests tuples cannot be represented, thus we use lists that we convert to tuples