0% found this document useful (0 votes)
100 views13 pages

Unit 4 Lesson 7 Conditionals PRACTICE New 2023

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
100 views13 pages

Unit 4 Lesson 7 Conditionals PRACTICE New 2023

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Unit 4 Lesson 7 Conditionals PRACTICE

You’ll go through each of these and learn how each APP is played. Learn how they function –
this is the key as you go through each one.

Level 1 Bubble A, B, C Part 1


All you are doing is looking at the APP and trying to discover in your mind what is happening
and how it might work. You are about to work through each of these APPs and build the code as
we progress through the lesson. What you are seeing now is the finished product.

1|Page
Level 2 Bubble A - Part 2– Emoji Movie APP
All you are doing on this level is declaring and initializing the variables; they are found on
lines of code 11-30; before you work on the emojis. You can copy the emoji’s by switching to
text in order to work through the lines of code. When you have completed the work on the
emojis you will only have lines of code: 11-22. Do not work beyond line 22.

Note: You choose the emoji’s and responses you want to use in your APP.

2|Page
Level 2 Bubble B - Part 2 – CodeFeed Quiz
One this level you will be modifying lines of code: 11-48 only. Using userAnswer A, B and C
with a category to each. Use the If, Else if, and Else statements

3|Page
Level 2 Bubble C - Part 2 - Tic Tac APP
You will need to set the event handlers for each space on the board. Here are the spaces on the
board and how you will label them. Lines of code 7-60.

4|Page
Now you will need to update the function called updateBoard in order for the game board to
work. Lines of code: 66-84.

******* Now we move on to PART 3 *******

5|Page
Level 3 Bubble 3A – Part 3 Emoji Movie APP
Begin on line 33 of the code. You will set the onEvent for submitAnswer. Beginning on line 34
we will set the IF statements. Line 36 – 56 is what we will work with.

6|Page
Level 3 Bubble 3B – Part 3 CodeFeed App
On this level you will work with lines of code 58-80. We are setting the condition of the final
results when the user has completed the game and they are given “who” they are based on the
pictures they chose in the game.

I could not fit all the text into a picture to show here so, here is the wording for each category:
"You are Kernelator!"
URL: "//images.code.org/c916747b277225eef22224346a433872-final1.png"
"Armed with the astonishing power of Rapid Replication, Kernelator can create
countless copies of themselves to form a mighty maize army. This cob
combatant tirelessly defends the world from chaos, popping up wherever
injustice rears its head."

"You are Tomatitán!"

7|Page
URL: "//images.code.org/bae14bf60beacf37b7a8bcdecbdb187a-final4.png"
"Possessing the extraordinary power of Antioxidant Aura, Tomatitán can neutralize harmful free
radicals in the environment, protecting both humans and nature from unseen dangers. This juicy
juggernaut fearlessly squashes all threats, keeping the world fresh and safe."

"You are Carrotron!"


URL: "//images.code.org/4b4abeca6a233cd5dae00180aa851ca6-final2.png"
"Wielding the incredible power of Vitamin Infusion, Carrotron can rejuvenate
and heal those around them, spreading health and vitality with just a touch. This
crunchy crusader always roots out evil and nourishes justice."

"You are Brocca!"


URL: "//images.code.org/4105de514533553a452a7409f5f75c51-final3.png"
"From the fabled Garden of Greens, Brocca can instantly boost the strength and
abilities of allies by sharing their nutrient-rich essence. This floret fighter
steams evildoers with ease."

8|Page
Level 3 Bubble 3C – Part 3 Tic Toc App
In this level we are going to work on lines: 103 – 131. We will be using variables with the same
names as these letter characters (X, and O), when we next create the conditional statements that
check whether there are three Xs or three Os in a row, triggering a win.

******* Now we move on to PART 4 *******

9|Page
On this level you will add the conditional statements (if, else if, else), to test the values of the
TURN value and set the text to display to the correct question. You will work with lines of code
54 – 81.

10 | P a g e
On this level you are making sure you have the questions and answer choices set along with the
pictures for each choice. Here are the URLs
Question 1 - Lines of Code: 87-96
//images.code.org/6886e5aa15bf6f4f912ce92297318bb2-velvet.png
//images.code.org/48f878eb0e4711e2c94520e428e662ee-rough.png
//images.code.org/aede40113f1545db507e1365551b0af8-itchy.png
//images.code.org/1cd3783d932b2a572b7586b8b7ddf9dd-bumpy.png

Question 2 – Lines of Code: 98 – 106


//images.code.org/dd6f2d13224c20505fd223875f92bc96-buttery.png"
//images.code.org/97ad25b9ce37a1516da388a14ada1a63-sweet.png"
//images.code.org/11ac94f610c403433f1d74bd875d4bb6-savory.png"
//images.code.org/25f69aed5df8759eb97d9f543b7bb0e5-salty.png"

Question 3 – Lines of Code: 108 – 116


11 | P a g e
//images.code.org/fbb9692c9afcae1e8e80378b156a4d2f-elCamino2.png
//images.code.org/448d5a0315f9017fcdc6c9812f66fd69-boxTruck.png
//images.code.org/f5b84513fb9866aedcf5c1a50ea24039-lambo.png
//images.code.org/90f9e80c7cf95dcecf6d1a4bc7f56166-elCamino.png

NEXT – check your event handlers for each question. They are located as indicated here:

12 | P a g e
On this level you will set the final condition to test whether there are any blank spaces left. You
will need to offer the ability to reset the game and start again. Lines of code: 121 – 132.

The text for the setProprty, setText, hideElement and showElement is already given to you in a
comment on lines 124-128, just convert the comments into what you see here.

Congratulations, you have completed lesson 7!

13 | P a g e

You might also like