equal
deleted
inserted
replaced
256 |
256 |
257 In debugging process we form a hypothesis of what causes the error. |
257 In debugging process we form a hypothesis of what causes the error. |
258 Test if it is correct by changing the code. And refine the hypothesis |
258 Test if it is correct by changing the code. And refine the hypothesis |
259 on the basis of our result. |
259 on the basis of our result. |
260 |
260 |
261 {{{ Slide with code snippet }}} |
261 |
262 |
262 |
263 Lets see another example of debugging. Create a file mymodule.py and |
263 Lets see another example of debugging. Create a file mymodule.py and |
264 add the following code:: |
264 add the following code:: |
265 |
265 |
266 def test(): |
266 def test(): |
267 total=1+1 |
267 total=1+1 |
268 print spam |
268 print spam |
269 |
269 |
270 {{{ Slide with code snippet }}} |
270 |
271 |
271 |
272 Lets now try and run this code :: |
272 Lets now try and run this code :: |
273 |
273 |
274 import mymodule |
274 import mymodule |
275 mymodule.test() |
275 mymodule.test() |