Ada-Developers-Academy / ada-build

Ada Build is curriculum that is intended for anyone who is interested in beginning their journey into coding.
744 stars 419 forks source link

Lesson 4 Example 3 error: num_one not defined #272

Closed ahaidri closed 2 years ago

ahaidri commented 2 years ago

When running the function in example 3 (located in "defining functions" heading) a NameError message is received that num_one is not defined.

I removed num_one and num_two from the print message so it only prints the_sum, and the sum came through without problem.

clarenceedmonds commented 2 years ago

Yes, the code as written produces an error because the num_one and num_two are specifically encapsulated within the function as parameters. There is also a note explaining the issue within the Lesson.