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

Do you need help?

Non mi passa i test su q2a

AndreaTasselli (5100 points)
4 6 11
in HW4 by (5.1k points)
Avevo programmato l'HW tutto nella funzione principale senza creare nessun'altra funzione e mi passava tutti i test, sia in test_01 che su q2a.

Avendo una complessità di 22, ho deciso di aggiungere un'altra funzione e infatti sono arrivato a 14 ma sui test passati mi risulta 0, cosa che non succede quando avvio test_01.
298 views
closed

2 Answers

Best answer
Exyss (21510 points)
1 2 79
by (21.5k points)
selected by

Vai nella sezione Corso -> Risultati -> Correttezza per vedere quale sia l'errore che viene generato su q2a, anche se probabilmente sarà un timeout error come dice @saidai

andrea.sterbini (207920 points)
750 1267 2373
by (208k points)

E                   testlib.ForbiddenError= Opening file 'poems/example.txt' with mode='r+' is forbidden!

Usa come mode solo "r"

AndreaTasselli (5100 points)
4 6 11
by (5.1k points)

Grazie mille yes

saidai (1400 points)
1 2 14
by (1.4k points)
Probabilmente i tuoi test vanno in timeout sulla vm, prova a ottimizzare un po' il codice