Math module introduction example in lesson 04-functions results in an error
krishnakumarg1984 opened this issue · 3 comments
In Lesson 04-functions, we currently have
>>> ratio = signal_power / noise_power
This leads to an error since neither of these two variables have been defined until that point.
Hi Krishnakumar,
This example is given as an illustration of how math module can be applied in terms of ratios hence no specific values have been declared. Hope it helps.
Yes. I understand that. However, it is noteworthy that out of all code blocks presented all the way from the very first chapter until now, only this one errors out (because the variables have not been defined).
This is likely to cause confusion to beginners (whom the course targets). It would be better to update the lesson wherein the variables are defined in the codeblock just prior to the SNR division statement, thereby providing a frictionless experience for those trying it out on their interactive python REPLs.
This is something common in the book,
e.g. 2.11 percentage=(minute100)/60 #minute is not defined
2.13 interest = principle rate, etc
These are examples that show something specific and cannot be treated as a whole program