Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

How to spoil and fix your code 3

You may have noticed that the error message generated for the previous error is quite different from the first one. 

This is because the nature of the error is different and the error is discovered at a different stage of interpretation. 

The Editor window will not provide any useful information regarding the error, but the console windows might. 

The message (in red) shows (in the subsequent lines): 

  • the traceback (which is the path that the code traverses through the different parts of the program - you can ignore it for now, as it is empty in such a simple code)
  • the location of the error (the name of the file containing the error, line number and module name); note: the number may be misleading, as Python usually shows the place where it first notices the effects of the error, not necessarily the error itself.
  • the content of the erroneous line; note: IDLE's editor winow doesn't show line numbers, but it displays the current cursor location at the bottom-right corner; use it to locate the erroneous line ina  long source code
  • the name of the error and a short explanation

Experiment with creating new files and running your code. Try to output a different message to the screen, e.g. roar!, meow, or even oink!, Try to spoil and fix your code - see what happens. 

 

Congratulations!
You have completed Module 1.

Well done! You've reached the end of Module 1 and completed a major milestone in your Python programming education. 
Here' s a short summary of the objectives you've covered and become familiar with in Module 1:

  • the fundamentals of computer programming., i.e., how the computer works, how the program is executed, how the programming language is defined and constructed
  • the difference between compilation and interpretation
  • the basic information about Python and how it is positioned among other programming languages, and what distinguishes it's different versions
  • the study resources and differen types of interfaces you will be using in the course. 

You are now ready to take the module quiz which will help you gauge what you've learned so far.