Python Classroom notes 19/Apr/2025

Debugging using visual studio code

  • Breakpoint: This is where the code execution stops and we get control
  • Step Over: This instructs the debugger to execute the current line
  • Continue: We give control back to debugger
  • Sections:
    • Variables
    • Watch
    • Call Stack

References

  • Gist link for individual code debugging practice
  • To debug
    • copy the python code in a file (with .py extension) and preferably in a new folder debugging-practice
    • Start Debugging
  • Findout the logical mistake in fibbonci problem
  • Solution is
a = 1
b = 2
sum = 2
while a + b < 100:
    c = a + b
    if c % 2 == 0:
        sum = sum + c
    a = b
    b = c
print(sum)
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a comment

Turn on JavaScript to leave a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company
Exit mobile version
%%footer%%