Comp 115: Robots, Games and Problem Solving

Lab 01

Welcome

Welcome to Comp 115 Lab. This week is a little unusual in that we haven't really learned enough to start a typical Comp 115 lab. A typical lab session usually consists of a few demos, followed by a series of exercises on the content we have just seen in class. Sometimes, when necessary, we may also discuss the content of the coming programming assignment. While we do have a very short lab exercise for you this week, the focus of this lab session is downloading and installing the software we will need this semester.

Installation Instructions
First, the interpreter. Click on this link and install Python version 3.7.4. Make sure you select version 3.7.4 of Python, it is fairly different from version 2.7. At the beginning of the install, if you have a Windows PC, make sure that you include the option to "Add Python 3.7 to PATH", as shown in the picture below.

Next, the Intelligent Development Environment (IDE). Click on this link to download and install Wing IDE 101 version 7.1.0. Use all the default options in the install wizard.

Launch Wing101. In the rectangle at the bottom right of the screen, make sure it says "3.7.4", the version of Python you installed in the previous step. If it says something else, please ask for help.

Exercises

We will now do a quick exercise to test your installation, but before we do, create a folder called Comp115 either on your Desktop or in your Documents folder (or wherever else you want to store all the files for this coures), create a folder Lab1 inside the folder Comp115, and save the file biggestNum.py, graphics.py and graphTest.py in Lab1.

First, open the file biggestNum.py in Wing101 and press the play button. The program should find the biggest number in a list.
If this does not work, something went wrong in the installation process and call us.
If everything works fine, then take a couple minutes to look at the program and try to figure out how it works. I know that you are new at this and do not worry if you are having a hard time reading the code, it will be weeks before I introduce every single concept used to write this program, but still, Python is a pretty intuitive language and you should get a rought idea of what is going on.
Once you think you understood the program a bit, try to modify it so that instead of finding the biggest number, it will find the smallest.

Second, open the file graphTest.py. This program probably looks like gibberish to you, it's ok, we just want to test if your computer has support for the graphics library that we will use in this course. Press the play button and see if a window is opened with a few points, a line and a yellow rectangle is drawn.
If so, perfect, you have completed everything that was required for this lab. Feel free to leave or stick around to help your classmates finish their installation.
If not, if you get errors regarding something about "tkinter" or "tk" when running a graphics program, then you will have to install Tk. Go to TkDocs and follow the appropriate directions for Windows. You may need to install the 32 bit version of Tk, not the 64 bit, even if your computer is 64 bit.
For any other problem, call us.