$30
CSC 242: Introduction to Computer Science II
Lab exercise set 10
Logistics
These exercises should be completed during the lab. In order to receive full credit for the lab,
you must attend the session, remain in the lab for at least 45 minutes, and submit a file that
contains solutions to all these exercises.
You are encouraged to work in groups on lab exercises. If you do work with someone, you must
include the name(s) of your collaborator(s) at the top of the file you submit. For more
information about collaboration policies in this class, see the Academic Integrity policy posted to
the D2L site.
. You must remain in the lab for at least 45 minutes to earn full credit. You are only allowed to
work on assignments with at most two-other people, either directly or indirectly, who must be
formally identified as part of your assignment submission. Please see the assignment description
and the course Academic Integrity pledge for the full description of the process you must follow
when completing assignments. If you need additional help on the assignment, please ask the
teaching assistant.
Exercises
Please remember that you are not allowed to consult online resources when completing lab
exercises. If you have questions, please either ask the teaching assistant or contact me by email.
Begin the lab by downloading the template file (csc242lab10.py) from the D2L site. It contains
the headers for the functions you will write. Do not modify the function names or parameters in
the template file.
NOTE: GUIs are event driven objects, that allow us to respond to interactions users
have with widgets, such as a Button. We are taking all the major concepts we have
covered in this class and integrating them into a single GUI interface. BizzaroGUI felt
like a fitting description. The idea of this lab is to get you to think about all the
individual techniques we’ve covered and abstract them into operations initiated
through the GUI.
1. Finish the BizzaroGUI implementation. The BizzaroGUI does three things:
a. Has a text box you can enter a URL and retrieve the title of the web page.
b. Enter a folder name and retrieve the depthCount of the folder (recursive
function provided for you.)
c. Enter a question and have the Magic8Ball answer it for you (Magic8Ball class
provided). You need to ‘shake’ the Magic8Ball each time a user enters a
question and clear the Entry field.
Enter a url and click “Get Title” button:
Results in:
Enter a folder name and press ‘GetDepth Count ‘button. This example traverses the Test folder
provided in the zip file. Make sure your .py is in the same folder that the test folder:
Finally, ask a Question and click ‘Get Magic Answer’:
Whew:
If you get done early, think about how you can optimize the interface and just use one edit
widget.
Submitting the exercises
You must submit your solutions to the exercises using the lab 10 dropbox on the D2L site.
Submit only a single Python file (e.g. csc242lab10.py) with each of the completed functions and
classes for the lab exercises in it. Submissions after the deadline listed above will be
automatically rejected by the system. See the syllabus for the grading policy.
Grading
The lab session is worth 10 points. If you complete the lab exercises before the end of the lab
session, please work on the eighth assignment. Remember that the rules for collaboration on
assignments is different from labs. Please review the Academic Integrity pledge for more
information. If you have questions about the assignment, please ask the teaching assistant for
help.