1 of 14

Day 34: Wednesday March 30, 2022

2 of 14

Average of five values

C

CODING

start loop

repeat 5 times

input Number

end loop

display Result

calculate Result = Result + Number

calculate Result = Result/5

set Result = 0

1

2

3

3 of 14

4 of 14

Which one doesn’t belong?

Find a reason why each one does not belong.

5 of 14

6 of 14

Check Your Understanding: Mild 🔥

C

CODING

1

2

A code is written to determine a person is old enough to vote.

Drag the blocks below into their correct positions to the right to complete the code.

set age = input

Else display “You can’t vote yet.”

define age as a variable

If age >= 18 then display “You can vote.”

7 of 14

Check Your Understanding: Medium 🔥🔥

C

CODING

1

2

3

A code is written to determine if a person has stayed within their budget.

Drag the blocks below into their correct positions to the right to complete the code.

If pay >= spending then display “Great! You stayed within budget.”

set spending = input

Else display “Uh oh! You’ll need to use some savings to pay your bills. What can you change in your budget so it doesn’t happen again?”

set pay = input

Define pay and spending as variables

8 of 14

Check Your Understanding: Hot 🔥🔥🔥

C

CODING

1

2

3

A code is written to determine ______.

Drag the blocks below into their correct positions to the right to complete the code.

set food = input

set transportation = input

set shelter = input

set pay = input

Define food, transportation, shelter, pay and difference as variables

If difference >= 0 then display “Great! You stayed within budget for your primary needs. You have $<difference> left for savings and other expenses”

Calculate difference = pay - (food + transportation + shelter)

Else display “Uh oh! You spent $<-1*difference> beyond what you earned. You’ll need to use some savings to pay your bills. What can you change in your budget so it doesn’t happen again?”

4

9 of 14

Check Your Understanding: Answers

C

CODING

1

2

set age = input

If age >= 18 then display “You can vote.”

Mild 🔥

1

2

3

Else display “Uh oh! You’ll need to use some savings to pay your bills. What can you change in your budget so it doesn’t happen again?”

set pay = input

Define pay and spending as variables

Medium 🔥🔥

1

2

3

4

Define food, transportation, shelter, pay and difference as variables

If difference >= 0 then display “Great! You stayed within budget for your primary needs. You have $<difference> left for savings and other expenses”

Calculate difference = pay - (food + transportation + shelter)

Else display “Uh oh! You spent $<-1*difference> beyond what you earned. You’ll need to use some savings to pay your bills. What can you change in your budget so it doesn’t happen again?”

Hot 🔥🔥🔥

ANSWERS.

PRESENT this slide then CLICK 🠊 to REMOVE the black box.

10 of 14

11 of 14

Coding Intro: My Takeaways

C�CODING

Page 20

Possibility of what you could include:

12 of 14

13 of 14

I know how to order steps to create an algorithm to solve a problem.

C2.2�CODING

Day

34

What have you learned about this that you didn’t know before?

Include examples of how you have shown this learning.

Complete this in your Learning Log.

14 of 14