<p>In this example the error message is about <c>set_time</c> not defined on line 3. In this case the undefined name is not used in an assignment statement, but is used as a parameter (incorrectly) to a function call. A search on <c>set_time</c> reveals that in fact it is only used once in the program. Did the author mean <c>set_alarm</c>? If we make that assumption we immediately get another error <c>NameError: name 'alarm_time' is not defined on line: 3</c>. The variable <c>alarm_time</c> is defined on line 4, but that does not help us on line 3. Furthermore we now have to ask the question is this function call <c>int(present_time, set_alarm, alarm_time)</c> even the correct use of the <c>int</c> function? The answer to that is a resounding no. Let's list all of the things wrong with line 3:</p>
0 commit comments