APT Quiz 1 Exam 1 is Sept 24, next Thursday APT Quiz 1 is 9/25-9/28 - - PowerPoint PPT Presentation

apt quiz 1
SMART_READER_LITE
LIVE PREVIEW

APT Quiz 1 Exam 1 is Sept 24, next Thursday APT Quiz 1 is 9/25-9/28 - - PowerPoint PPT Presentation

Announcements Compsci 101 Turtle, Bagels, Loop Tracing, Files APT-2 due tonight! Live Lecture Remember you get 24-hour grace period, cant turn in after that! APT-3 out today due 9/22 Susan Rodger Assignment 2 Turtles out


slide-1
SLIDE 1

Compsci 101 Turtle, Bagels, Loop Tracing, Files Live Lecture

9/15/2020 Compsci 101, Fall 2020 1

Susan Rodger September 15, 2020

Announcements

  • APT-2 due tonight!
  • Remember you get 24-hour grace period, can’t

turn in after that!

  • APT-3 out today – due 9/22
  • Assignment 2 Turtles out – due 9/29
  • Lab 4 Friday – has prelab to do before lab!

9/15/2020 Compsci 101, Fall 2020 2

Exam 1 Studying

  • Exam 1 is Sept 24, next Thursday
  • Covers topics through this week
  • Not while loops, not files
  • How to study
  • Write code on paper or type code in a plain text file
  • Redo code you have already done, we did class
  • Try things in Python Tutor, in Python Console
  • Review all notes
  • Old tests on Resources tab
  • Spring 18 on, is Python 3, Before that Python 2
  • Try timing yourself on old exams?
  • CS101 Reviewer APP – use in prelab for Lab 4

9/15/2020 Compsci 101, Fall 2020 3

APT Quiz 1

  • APT Quiz 1 is 9/25-9/28 (no lab on 9/25)
  • Open around 8am 9/25
  • Pick your start time,
  • Once you start, You have 2.5 hours
  • If you get accommodations, you get those
  • 3 APTs to solve
  • Will put up problems from an old APT Quiz so you

can practice

9/15/2020 Compsci 101, Fall 2020 4

slide-2
SLIDE 2

WOTO-1 – Turtles Simple http://bit.ly/101f20-0915-1

  • If you are done early, revise and collaborate on

your notes!

  • In your groups:
  • Come to a consensus

9/15/2020 Compsci 101, Fall 2020 5

WOTO-2: Let’s draw a triangle! http://bit.ly/101f20-0915-2

  • Equilateral triangle
  • Corner degrees: 60
  • Side length: 100

9/15/2020 Compsci 101, Fall 2020 6

Bagels (Accumulation)

9/15/2020 Compsci 101, Fall 2020 9

This Photo by Unknown Author is licensed under CC BY-NC-ND

APT Bagels

  • How figure out how many bagels needed?
  • 7-steps!

9/15/2020 Compsci 101, Fall 2020 10

slide-3
SLIDE 3

9/15/2020 Compsci 101, Fall 2020 11

Examples

9/15/2020 Compsci 101, Fall 2020 12

Step 1 and 2

  • Step 1: Solve an instance (think)
  • orders = [11, 3, 24, 17]

9/15/2020 Compsci 101, Fall 2020 13

WOTO-3 Step 3: Generalize http://bit.ly/101f20-0915-3

9/15/2020 Compsci 101, Fall 2020 15

slide-4
SLIDE 4

Donald Knuth

  • Until recently …
  • Was "The Donald"
  • Turing, Hopper, more …
  • Author of many works

Art of Computer Programming Mad Magazine when 19 (author of TeX) “I can’t go to a restaurant and order food because I keep looking at the fonts on the menu.”

9/15/2020 Compsci 101, Fall 2020 20

Code-Tracing a Loop

  • 1. Find the changing variables/expressions
  • 2. Create table, columns are variables/expressions
  • 1. First column is loop variable
  • 2. Add columns to help track everything else
  • 3. Each row is an iteration of the loop
  • 1. Before execute code block, copy down each

variable’s value

  • 2. Execute code block, update a value in the row

as it changes

9/17/2020 Compsci 101, Fall 2020 21

WOTO Loop Tracing http://bit.ly/101f20-0915-4

  • Remember the steps (1) Find the changing

variable/expressions, (2) Create the table with these as the column, and (3) Each row is an iteration of the loop

  • In your groups:
  • Come to a consensus

9/17/2020 Compsci 101, Fall 2020 22