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.

HW4 Usage of both phones_for_word and stresses

pasqualinaparadiso (1000 points)
1 2 4
in HW4 by (1.0k points)

I looked into how the functions phones_for_word and stresses work on this page. If phones_for_word returns the ARPAbet  and the stress of the syllable, what is the use of stresses? Is it mandatory, at this point, to use it?

348 views

2 Answers

GabrielAlexandru (7760 points)
2 4 29
by (7.8k points)
I think we need to use stresses because it's implemented differently than however we are going to do it, and probably it's faster. Plus, it's easier to write stresses(string) than implementing all the code.

I don't know though if this is the correct explanation as to why we need to use stresses
KilianS (3590 points)
7 10 27
by (3.6k points)
i mean, most functions in modules are checked for efficiency regularly, so we probably wont write a quicker function ‍♂️

i guess you could do without though, someone correct me if im wrong