Lesson 7 - System_Check.py

In this lesson, we are going to code our very first python program!! Its going to be very very simple. All we are going to do is have the monkey (AKA you) touch a start button then touch a green square to receive a pellet (almost identical to system check). This will hopefully teach you the basics of coding a monkey program and will allow you to see how they run! Let’s gooooooo!!!

 

 

Click the button below and download the .zip file titled: “SYSTEM CHECK – LRC CLASS.zip

Let’s first get acclimated with the contents of this folder. This is how I typically layout all of my tasks . Each important item is labelled below. You may note that some of these items are also found in the C: Drive of a monkey’s computer, such as monkey.txt. However, I like to keep everything local. It allows you to change the monkey’s name without affecting all the other tasks on the computer.

Now if you double click the System Check.py File, it should open up the task. Take a look at what the program is doing. It is very similar to the system check that we run each morning. We are going to code this right now! 

 

I have provided two copies of the script, the full copy which is fully operational and the student copy which has some holes in the code. You can choose to work with whichever you like. I know personally I learn better by actually coding it myself, but others like looking at the finished code and learning it that way. All up to you!

LETS DO IT!

First open the script in your preferred IDE. I do not have PyCharm so I will be doing it in IDLE. The code all works the exact same though. Here is how you open it in IDLE on Windows.

Now that you have it opened, continue to Lesson 8 so we can go line by line through the code.