ALEX Classroom Resource

  

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

  Classroom Resource Information  

Title:

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

URL:

https://curriculum.code.org/csf-18/coursed/11/

Content Source:

Code.org
Type: Lesson/Unit Plan

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.

Content Standard(s):
Digital Literacy and Computer Science
DLIT (2018)
Grade: 3
2) Analyze a given list of sub-problems while addressing a larger problem.

Example: Problem - making a peanut butter sandwich; sub-problem - opening jar, finding a knife, getting the bread.
Problem - design and share a brochure; sub-problem - selecting font, choosing layout.

Unpacked Content
Evidence Of Student Attainment:
Students will:
  • analyze a given list of sub-problems while addressing a larger problem.
Teacher 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
DLIT (2018)
Grade: 3
5) Create an algorithm to solve a problem as a collaborative team.

Examples: Move a character/robot/person through a maze. List steps to build a sandwich.

Unpacked Content
Evidence Of Student Attainment:
Students will:
  • create an algortihm.
  • work collaboratively.
  • solve a problem or complete a task with the algortihm.
Teacher 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
DLIT (2018)
Grade: 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.

Examples: Sequencing cards for unplugged activities, online coding practice.

Unpacked Content
Evidence Of Student Attainment:
Students will:
  • test a given program in a block
  • based visual programming environment using arithmetic operators, conditionals, and repetition in programs.
  • debug a given program in a block
  • based visual programming environment using arithmetic operators, conditionals, and repetition in programs.
  • collaborate with others.
Teacher 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
DLIT (2018)
Grade: 3
23) Implement the design process to solve a simple problem.

Examples: Uneven table leg, noise in the cafeteria, tallying the collection of food drive donations.

Unpacked Content
Evidence Of Student Attainment:
Students will:
  • implement the design process to solve a simple problem.
Teacher 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.
Tags: algorithm, condition, debug, farmer, loops, problem solving, program, while loops
License Type: Custom Permission Type
See Terms: https://code.org/tos
For full descriptions of license types and a guide to usage, visit :
https://creativecommons.org/licenses
Accessibility
Comments
  This resource provided by:  
Author: Aimee Bates
Alabama State Department of Education