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.

Dubbio su test2 H3

B
Battisti98 (1230 points)
0 6 12
in Es2 by (1.2k points)
recategorized by
Sulla consegna del test numero 2 dice che il metodp to_tuple(self) dello skyline torna la tupla (sfondo,)

Non capisco io o c'è un errore nella frase?

Vuole la tupla r,g,b dello sfondo o cosa?

Ritornando la tupla r,g,b nel test mi da Errore -> 'Colore' object is not iterable
317 views
closed with the note: answered

1 Answer

_andrea_ (45670 points)
13 42 297
by (45.7k points)
Si anche a me sembrava strano, devi solo ritornare una tupla di un elemento, che si scrive così (elemento,). In quel caso devi ritornare l'oggetto colore associato allo skyline, quindi una cosa tipo
return (self.sfondo,)