Compsc psci 101 101 Turtle, B Bagels, s, L Loop T p Tracing ng, F Files Liv ive L Lec ecture
9/15/2020 Compsci 101, Fall 2020 1
Susan Rodger September 15, 2020
Compsc psci 101 101 Turtle, B Bagels, s, L Loop T p Tracing - - PowerPoint PPT Presentation
Compsc psci 101 101 Turtle, B Bagels, s, L Loop T p Tracing ng, F Files Liv ive L Lec ecture Susan Rodger September 15, 2020 9/15/2020 Compsci 101, Fall 2020 1 Announcements APT APT-2 du due toni night! Remember you get
9/15/2020 Compsci 101, Fall 2020 1
Susan Rodger September 15, 2020
APT-2 du due toni night!
turn in after that!
APT-3 ou
9/22 22
t 2 Turtl tles o
t – due due 9 9/29
b 4 Friday – has pr prelab t to do do be before l lab! b!
9/15/2020 Compsci 101, Fall 2020 2
am 1 1 is Sep Sept 24, 24, nex ext Th Thursday
vers top
cs th through th this is w week
to stu tudy
9/15/2020 Compsci 101, Fall 2020 3
1 is 9/ 9/25 25-9/28 28 ( (no l lab o
9/25) 5)
en around und 8 8am 9 9/25
ick y your r start t tim ime,
to
ut up up p problems f from a an n old APT APT Q Qui uiz s so y you u can an p prac actice
9/15/2020 Compsci 101, Fall 2020 4
are d e done e early, revi vise a e and c d collab aborate e on your n note tes!
your g groups ps:
9/15/2020 Compsci 101, Fall 2020 5
lateral t l triangle le
9/15/2020 Compsci 101, Fall 2020 6
lateral t l triangle le
9/15/2020 Compsci 101, Fall 2020 7
What will t will the t turtle d dra raw?
after each iteration
9/15/2020 Compsci 101, Fall 2020 8
Option 1 (Draw 3 triangles on top of each
Option 2 Option 3 Option 4
Orientation and location matters!
9/15/2020 Compsci 101, Fall 2020 9
This Photo by Unknown Author is licensed under CC BY-NC-ND
e out h how many b y bag agel els n need eeded? d?
9/15/2020 Compsci 101, Fall 2020 10
9/15/2020 Compsci 101, Fall 2020 11
9/15/2020 Compsci 101, Fall 2020 12
ep 1 1: S Solve e an i instan ance (t (think)
9/15/2020 Compsci 101, Fall 2020 13
ep 1 1: S Solve e an i instan ance ( (TPS)
2: W What di did w d we do do?
9/15/2020 Compsci 101, Fall 2020 14
9/15/2020 Compsci 101, Fall 2020 15
throug ugh l h list
f less th than 12 12
eater er t than an o
al t to 12
everything
9/15/2020 Compsci 101, Fall 2020 16
to 12
12 goes into the order
9/15/2020 Compsci 101, Fall 2020 17
to 12
times 12 goes into the
statement?
9/15/2020 Compsci 101, Fall 2020 18
Could we use the accumulator pattern? Yes!
9/15/2020 Compsci 101, Fall 2020 19
Initialize before loop Update inside loop Do something with value after loop
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
1.
d the c e chan anging va variab ables es/expressions 2.
eate t table, columns a are va e variab ables/ex expres essions
3.
row is w is an it iteratio ion o
loop
variable’s value
as it changes
9/17/2020 Compsci 101, Fall 2020 21
ember t the e steps eps ( (1) F Find t the e chan anging va variab able/expressions, ( (2) C Crea eate t the t e tab able w e with thes ese as as t the e column, and ( (3) E Eac ach row is a an ite terati tion
your g groups ps:
9/17/2020 Compsci 101, Fall 2020 22