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.

Homework 4 test error

j
jasin1 (270 points)
1 2 3
in HW4 by (270 points)
recategorized by
I got this error in test 07 : 0.822363 != 0.84305. does anyone have the same problem? All other tests work and the matrix output is correct, but for some reason the sync value comes out wrong.
306 views

3 Answers

Quellocinese (2700 points)
4 4 22
by (2.7k points)
if the matrix output is 100% correct the problem should be in the syncronization algorithm. is the test 07 the only one that doesn't pass?
j
jasin1 (270 points)
1 2 3
by (270 points)
Yes, all the other tests work
Quellocinese (2700 points)
4 4 22
by (2.7k points)
try manually testing 07, with debugger and see line by line if the variables change as you expect
Simone Russolillo (5790 points)
7 10 22
by (5.8k points)
i had the same issue and I figured out that I accidentally deleted a line of the poem, try to download the zip file again
j
jasin1 (270 points)
1 2 3
by (270 points)
I tried but nothing
Simone Russolillo (5790 points)
7 10 22
by (5.8k points)
are you sure the matrices are identical? the one you get and the one it should be?
j
jasin1 (270 points)
1 2 3
by (270 points)
Yes, the matrix expected and the one generated by my code are identical
rokshana03 (16750 points)
1 4 35
by (16.8k points)
The error is most likely in the part of your code where you compute the whole sync. I had the same issue as well but then I realized I had written a condition wrong and that I left some random numbers in it.

I'd suggest you to check:

- if you opened your file in the right encoding, "encoding = utf - 8"

- if you added all the cba / cab values correctly

- if you considered all the conditions possible while you search for the preceding accents ( this is what used to give me error)