Computer Science Fundamentals Unit 5 Course D Lesson 11: While Loops in Farmer (2018)

Learning Resource Type

Classroom Resource

Subject Area

Digital Literacy and Computer Science

Grade(s)

3

Overview

By the time students reach this lesson, they should already have plenty of practice using repeat loops, so now it's time to mix things up.

While loops are loops that continue to repeat commands while a condition is met. While loops are used when the programmer doesn't know the exact number of times commands need to be repeated but does know what condition needs to be true in order for the loop to continue repeating. For example, students will be working to fill holes and dig dirt in Farmer. They will not know the size of the holes or the height of the mountains of dirt, but the students will know they need to keep filling the holes and digging the dirt as long as the ground is not flat.

As your students continue to deepen their knowledge of loops, they will come across problems where a command needs to be repeated, but it is unknown how many times it needs to be repeated. This is where while loops come in. In today's lesson, students will develop a beginner's understanding of condition-based loops and also expand their knowledge of loops in general.

Students will be able to:
- distinguish between loops that repeat a fixed number of times and loops that repeat as long as a condition is true.
- use a while loop to create programs that can solve problems with unknown values.

Note: You will need to create a free account on code.org before you can view this resource.

Digital Literacy and Computer Science (2018) Grade(s): 3

DLCS18.3.2

Analyze a given list of sub-problems while addressing a larger problem.

UP:DLCS18.3.2

Vocabulary

  • sub-problem

Knowledge

Students know:
  • strategies for analyzing sub-problems from a given list for a larger problem.

Skills

Students are able to:
  • analyze given lists of sub-problems while addressing a larger problem.
  • identify the sub-problems for a larger problem.

Understanding

Students understand that:
  • larger problems have sub-problems.
  • it can be easier to solve a large problem if you identify smaller sub-problems to tackle or solve.
Digital Literacy and Computer Science (2018) Grade(s): 3

DLCS18.3.5

Create an algorithm to solve a problem as a collaborative team.

UP:DLCS18.3.5

Vocabulary

  • algorithm
  • collaborative

Knowledge

Students know:
  • an algorithm can be used to solve a problem or complete a task.
  • the steps in creating an algortihm as a collaborative team.

Skills

Students are able to:
  • work as a collaborative team to create a problem-solving algorithm.
  • list steps in solving a problem.

Understanding

Students understand that:
  • algorithms are used to solve problems or complete a task in a step-by-step process.
Digital Literacy and Computer Science (2018) Grade(s): 3

DLCS18.3.7

Test and debug a given program in a block-based visual programming environment using arithmetic operators, conditionals, and repetition in programs, in collaboration with others.

UP:DLCS18.3.7

Vocabulary

  • test
  • debug
  • program
  • block-based visual programming environment
  • arithmetic operators
  • conditionals
  • repetition

Knowledge

Students know:
  • strategies for debugging a given program.
  • arithmetic operators create a single numerical solution from multiple oprations.
  • conditionals are "if, then" statements that direct the program.

Skills

Students are able to:
  • test a given program in a block-based visual programming environment using arithmetic operators, conditionals, and repetition in programs, in collaboration with others.
  • debug a given program in a block-based visual programming environment using arithmetic operators, conditionals, and repetition in programs, in collaboration with others.

Understanding

Students understand that:
  • a given program must be tested and debugged to run correctly.
  • block-based visual programming uses arithemetic operators, conditionals, and repetition to function.
Digital Literacy and Computer Science (2018) Grade(s): 3

DLCS18.3.23

Implement the design process to solve a simple problem.

UP:DLCS18.3.23

Vocabulary

  • implement
  • design process
  • problem

Knowledge

Students know:
  • the steps in the design process are to define the problem, research the problem, brainstorm and analyze ideas, imagine solutions, build a prototype and test it, and make improvements.
  • how to implement the design process to solve a simple problem.
  • how to identify a simple problem.

Skills

Students are able to:
  • identify the steps in the design process.
  • apply the design process to a simple problem.
  • implement the steps in the design process to solve a simple problem.

Understanding

Students understand that:
  • the steps in the design process are to define the problem, research the problem, brainstorm and analyze ideas, imagine solutions, build a prototype and test it, and make improvements.

CR Resource Type

Lesson/Unit Plan

Resource Provider

Code.org

License Type

Custom
ALSDE LOGO