Python For Kids (Part 13: Debugging "Hello World"?)

Python For Kids (Part 13: Debugging "Hello World")

For a complete table of contents of all the lessons please click below as it will give you a brief of each lesson in addition to the topics it will cover. https://github.com/mytechnotalent/Python-For-Kids

Today we will debug or "look inside" our first program. Each of these lessons will involve learning something new and then "looking inside" at it so we have a complete understanding of what we are doing and have a much deeper prospective of Python as most courses only briefly touch upon this most import concept. With this course you will be ONE with the Python :)

STEP 1: Open Mu IDE

No alt text provided for this image

STEP 2: Click Load

No alt text provided for this image

STEP 3: Open File - Click main.py - Click Open

No alt text provided for this image

STEP 4: Update Code

No alt text provided for this image

STEP 5: Click Save

No alt text provided for this image

STEP 6: Click Run

No alt text provided for this image

STEP 7: Type N & Press Enter

No alt text provided for this image

STEP 8: WATCH HOW OUR DEBUGGER RAN OUR PROGRAM STEP-BY-STEP

No alt text provided for this image

Ok... I know this may be a little scary at first but please take your time and work with this.

All that we did was tell our program to "take your time" and run "each line" so we can see what is going on under the hood.

In this example we typed in the n letter which means next which means, "hey computer go ahead and be a cool dood and run line 2 so I can see what happens".

Then we see Hello, World! printed out like we saw in our last lesson.

HOMEWORK:

I want you to go back to the program and type in something other than Hello, World! and then click save and run and n and watch the result.

This will not make sense now but with every lesson we will use this debugging technique so we have a better understanding of Python.

In the next lesson we work with I/O meaning input and output and interact with our program a little more.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了