GCTAA Logo

Governor's Career & Technical Academy Arlington

Introduction to Computer Science: Week 5


Overview

This week we will finish with the Oject-Oriented Programming module in the SoloLearn Python 3 Tutorial and begin a new tutorial: Django for Everybody.

Friday, February 7th

Classwork

We will spend today on a show and tell of our solutions for creating the Base64Converter class.

Homework

Watch the first three in the serious of video lectures in Introduction to Dynamic Web Content from Dr. Chuck's Django for Everybody course. As you watch the videos, complete the DJ4E Study Guide 1: Dynamic Web Content, which you should hand in on your arrival in class next Tuesday.

Evaluation

You will be evaluated on your Base64Converter class in your git repo, together with your readiness to discuss your code during class.

Wednesday, February 5th

Classwork

After the quiz today, you will work with your partner to finish the Base64Converter class.

Homework

If you did not finish in class today, use homework time finish the Base64Converter class. Be prepared to present your solution in class on Friday.

Evaluation

You will be evaluated equally on your git repo and your quiz results.

Monday, February 3rd

Classwork

After our OOP2 quiz, we will take a look at Christopher's git repo and discuss how it is a shining example of best practices.

Period 3 Pairs
Jio and Devin, Jail and Liam, Francesco and Miguel, Leila and Jakob, and Graham and Rowan

Select pairs will take the Base64 encoding code here and use your new knowledge of OOP to do the following:

  1. Download OOPbase64.tgz to your local computer and uncompress it, extracting the three files test_base64.txt, base64encode and base64decode.
  2. Without changing these three files, create a file named base64.py that defines a Base64Converter class that makes the test file run without errors and the base64encode and base64decode work as desired. You should discuss with your partner whether to start is base64_tools.py as is and morphing it into base64.py, whether you want to start with an empty base64.py and use base64_tools.py as a guide to build up base64.py.
  3. Use the following initialization method for your Base64Converter class:
        def __init__(self):
            """
            Create a string containing the Base64 digits for encoding and a
            dictionary containing the numerical value of each digit character
            for decoding.
            """
            self.digits = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
            self.digits += 'abcdefghijklmnopqrstuvwxyz0123456789+/'
            self.digpos = {}
            for pos, dig in enumerate(self.digits):
                self.digpos[dig] = pos
    

Homework

Complete the final three blocks of the Object-Oriented Programming module from our SoloLearn course: Properties, A Simple Game, and Module 7 Quiz, doing experiments and committing them to your csc200 inside your OPP subdirectory as you work through the lesson. Make a serious effort to aspire to the high standard set for us by Christopher. Take good notes, and be prepared for a quiz on the Simple Game example and the end of module quiz questions when you arrive to class on Wednesday.

Evaluation

You will be evaluated equally on your git repo and your quiz results.