Free. Exclusive. Just for you.
Four unique services that make learning easier, faster, and smarter - only on our website.

Coding a Photo Liker app with Scratch-like blocks to manage likes and comments.

A screenshot of a coding interface for a "Photo Liker" app project, showing a kitten image, code blocks for variables and event handlers, and a mobile app preview.

A screenshot of a coding interface for a "Photo Liker" app project, showing a kitten image, code blocks for variables and event handlers, and a mobile app preview.

JPG 1280×720 142.2 KB Free · Personal Use
Quality Assured by Worksheets Library Team
Reviewed for educational accuracy and age-appropriateness
ID: #1061133
⭐
Show Answer Key & Explanations Step-by-step solution for: AP CSP - Code.org: Unit 4: Lesson 4 VARIABLES MAKE (2021)
▼
Looking at the code in the workspace:

- Line 2: `var likes = 0;` → This sets the starting value of “likes” to zero.
- Line 3: `var comment = 0;` → This sets “comment” to zero (not used yet).
- Lines 6–11: When the button with id "downButton" is clicked:
- Line 7: `likes = likes - 1;` → Decreases likes by 1 each time you click.
- Line 8: Updates the text on screen to show “Likes: ” followed by the current number.
- Line 9: Plays a sound when clicked.

In the app preview on the left, it shows “Likes: -9”. That means the down button was clicked 9 times (since we started at 0 and subtracted 1 nine times: 0 - 9 = -9).

The task says: “Build the Photo Liker app... submit your work.” The student has already built it — the code is written, and the app displays correctly based on that code. There’s no error shown, and the behavior matches what the code does.

Since the user options are all false (ExplainAnswer, TeachTopic, GeneratePractice), we don’t need to explain, teach, or generate practice — just give the final answer if there’s one to solve for.

But wait — looking again, this isn’t a math problem with a single numerical answer. It’s a coding activity where the student builds an app. The image shows the completed state. The only thing left might be to “submit” as instructed.

However, since the prompt asks us to “solve the problem accurately,” and the only visible output from the code is “Likes: -9”, perhaps the question implied is: What will the app display after clicking the down button 9 times?

That would be: Likes: -9

Which matches exactly what’s shown.

So the final answer is the displayed value.

Final Answer:
Likes: -9
Parent Tip: Review the logic above to help your child master the concept of unit 4 lesson 4.
Print Download

How to use

Click Print to open a print-ready version directly in your browser, or use Download to save the file to your device. The ⭐ Answer button generates an AI answer key instantly - useful for teachers who need a quick reference. Need a different version? Our AI Worksheet Generator lets you create a custom worksheet on any topic in seconds.

(view all unit 4 lesson 4)

unit 4 lesson 1 five a day - ESL worksheet by seddikfathia
Grade 7 Mathematics, Unit 4.4 - Open Up Resources
Solved Unit 4 Lesson 4 Cumulative Practice Problems 1. A | Chegg.com
Unit 5 Lesson 4 Help - Unit and Lesson Discussion - Code.org ...
Stage 1 Year A Unit 4 Maths Teaching Slides – The Busy Honey Bee
Activity Guide - Variables Make - Unit 4 Lesson 4 | PDF | Computer ...
Unit 4 Lesson 4(Up1) Mrs.Thuy worksheet | Live Worksheets
Lesson plan unit 4 by Nicte - Issuu
Brainy 5 Short Tests Unit 4 Lesson 4 | PDF
Illustrative Math - Algebra 1 - Unit 4 - Lesson 5 - Formative ...