Homework 4 test error

j
jasin1 (270 points)
1 1 3
asked Nov 20, 2021 in HW4 by jasin1 (270 points)
recategorized Nov 20, 2021 by jasin1
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.
96 views

3 Answers

Quellocinese (2670 points)
2 3 22
answered Nov 20, 2021 by Quellocinese (2,670 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 1 3
commented Nov 20, 2021 by jasin1 (270 points)
Yes, all the other tests work
Quellocinese (2670 points)
2 3 22
commented Nov 20, 2021 by Quellocinese (2,670 points)
try manually testing 07, with debugger and see line by line if the variables change as you expect
Simone Russolillo (5700 points)
4 8 20
answered Nov 20, 2021 by Simone Russolillo (5,700 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 1 3
commented Nov 20, 2021 by jasin1 (270 points)
I tried but nothing
Simone Russolillo (5700 points)
4 8 20
commented Nov 20, 2021 by Simone Russolillo (5,700 points)
are you sure the matrices are identical? the one you get and the one it should be?
j
jasin1 (270 points)
1 1 3
commented Nov 20, 2021 by jasin1 (270 points)
Yes, the matrix expected and the one generated by my code are identical
rokshana03 (7100 points)
1 2 25
answered Nov 20, 2021 by rokshana03 (7,100 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)