Governor's Career & Technical Academy Arlington

CSC 221 Weekly Assignments: Week 7

CSC 221


Overview

This week we begin with a new curriculum resource, Dr. Chuck's Python for Everybody.

Friday, October 13th

Classwork

We will begin class with the promised quiz on Lesson 5. After that I will give you another PCEP practice question and a Python program to automate answering it for you to study while I grade your quiz and give it back to you.

If time permits, we will go over the quiz.

PCEP Practice

Identify the appropriate data type name (String, Boolean, Integer, Float, Tuple, or Dictionary) for each of the following literals:

  • 'ACC'
  • 3.14159
  • [1, 2, 3]
  • -32_378_245
  • ('a', 'b', 'c')
  • True
  • {'count': 5, 'color': 0xA40785}

After you finish your quiz, download which_type.py and experiment with it until you understand what it does.

Homework

Watch the video lectures in Lesson 7: Strings and complete the autograder exercise 6.5 and the quiz at the end of the lesson.

Tuesday, October 10th

Daily PCEP Warm Up Question

How many stars will the following code print?

x = 1
while x < 12:
    x += 1
    if x % 3 == 0:
        continue
    if x % 2 == 0 and x % 5 == 0:
        break
    print('*', end='*')

Classwork

During class today you will sign-in to Python for Everybody using your VCCS email address, and I will introduce you to the resources that it provides.

We will then review the following topics to which we were introduced in our GASP programming course:

  • boolean values and boolean expressions
  • loops - definite and indefinite
  • break and continue statements

Homework

Watch the video lectures in Lesson 6: Loops and Iterations and complete the autograder exercise 5.2 and the quiz at the end of the lesson.