Search Header Logo
Mr. Lee's U2L5 Day 1 Do Now

Mr. Lee's U2L5 Day 1 Do Now

Assessment

Presentation

Computers

12th Grade

Practice Problem

Medium

Created by

TSEE LEE

Used 6+ times

FREE Resource

4 Slides • 4 Questions

1

Hotspot

Spot the bug, if any.

(Click on the block you think is wrong. If nothing looks wrong, click on the hat block.)

2

media
media

The shopping list is reset to an empty list every time the sprite is clicked, then an item is added to it. So "shopping list" will ever only contain the last item added to it.

3

Hotspot

Spot the bug, if any.

Again, choose a hat block if no bug is found.

4

media
media

The list "shopping list" will never get updated. list(shopping list) creates a new one-item list in which the only item is itself a list (the full shopping list). But that list is never stored anywhere, in a variable, so it disappears as soon as that instruction finishes.

5

Hotspot

Assume this is the only script for the add item sprite. Find the bug, if any.

6

media

This is a rare run-time error in Snap. Like what it sounds like, it happens while the program is running. Run-time errors stop the program from continuing (crashing the app). Explain on the next slide what the bug is.

7

Open Ended

Explain the bug in the previous slide.

8

media
media
media
media
media

Append: (v.) “Add” to the end

● Append “juice” to “orange”: “orangejuice”

● Append “5” to “10”: “105”

● Append 5 to [10] (a list containing number 10): [10, 5]

● Append “juice” to [“beet”, “root”]: [“beet”, “root”, “juice”]

Spot the bug, if any.

(Click on the block you think is wrong. If nothing looks wrong, click on the hat block.)

Show answer

Auto Play

Slide 1 / 8

HOTSPOT