Happy New Unit!
Unit 2 - Intro To Graphics

Unit 2, Day 1

Mr. Jones | AP Computer Science Principles

Warmup

Come on in, sit anywhere you like

  • Our guest speakers are on their way
  • Review your notes about consulting

Activity - Guest Speaker

Welcome Guests

Santiago Cubeddu and Renzo Lara

Associate Consultants

Mastercard Advisors Client Services

Upcoming Schedule

Schedule for the rest of the quarter

  • Today through next Tuesday (24th) - CMU CS Academy Content
  • Next Thursday (26th)
    • Test
    • Start project
      • Due EOD Monday Oct 30
      • Re-do’s accepted through EOD Nov 6
        • Other than this assignment, nothing accepted after quarter exam
  • Wednesday Nov 1
    • Quarter Exam, in 3 parts:
      • Binary Quiz
      • Unit 1 Test
      • Unit 2 Test
  • Friday Nov 3
    • Last 2-day of Q1

Today’s Coding Assignment

Review - Functions

You should be familiar with functions from math class. Functions in Python are very similar!

Image borrowed without permission from https://homework.cpm.org/category/CC/textbook/cca2/chapter/4/lesson/4.2.1/problem/4-75

Review - Functions

Multiple functions can be “chained” together

Image borrowed without permission from https://homework.cpm.org/category/CC/textbook/cca2/chapter/4/lesson/4.2.1/problem/4-75

Inputs and Outputs

    Rect(50, 50, 100, 100, fill=gradient('red', 'blue', start='left'))
  • Rect is a function
    • top, left, width, height are all required arguments
    • fill is an optional argument
  • Gradient is a function
    • The list of colors is required
    • start is an optional argument
  • The output of Gradient is an input to Rect

CMU CS Academy

  • Get through 1.1.5 Exercises

Recap Unit 2, Day 1

Last time we…

  • Looked at parts of a computer
  • Invented counting systems with everyday objects