## Computational Thinking for K-12 Educators: Conditional Loops and If Statements

Start Date: 03/24/2019

 Course Type: Common Course

Explore 1600+ online courses from top universities. Join Coursera today to learn data science, programming, business strategy, and more.

Want to make a game that ends when you "catch" an object by clicking on it? Or maybe you get points based on how close you came? You'll do that in this class! This class teaches the concepts of conditional loops and if/else statements. For each concept, we'll start by helping you connect real-world experiences you are already familiar with to the programming concept you are about to learn. Next, through a cognitively scaffolded process we'll engage you in developing your fluency with problem solving with repeat until loops, while loops, and if/else statements in a way that keeps frustration at a minimum. Along the way you will learn about the common challenges or "bugs" students have with these concepts as well as ways to help them find and fix those concepts. You'll also be guided in running classroom discussions to help students develop deeper understanding of these concepts. Finally, you'll learn how to support interactive learning experiences among your students with Peer Instruction. Additionally, you will create a resource for your classroom to support an equitable classroom.

#### Course Syllabus

In this module we will learn about conditional loops and how they vary from fixed loops. We'll examine different examples of both loop types and look at some common challenges that you may come across. Finally you'll create your own conditional loop program and have the opportunity to create an assignment and conduct peer reviews.

#### Course Introduction

Want to make a game that ends when you "catch" an object by clicking on it? Or maybe you get points

#### Related Wiki Topic

Article Example
Computational thinking Jeannette Wing envisioned computational thinking becoming an essential part of every child's education. However, since her article (published in 2006) integrating computational thinking into the K-12 curriculum has faced several challenges including the agreement on the definition of computational thinking. Currently Computational Thinking is broadly defined as a set of cognitive skills and problem solving processes that include (but are not limited to) the following characteristics:
Computational thinking Current integration computational thinking into the K-12 curriculum comes in two forms: in computer science classes directly or through the use and measure of computational thinking techniques in other subjects. Teachers in Science, Technology, Engineering, and Mathematics (STEM) focused classrooms that include computational thinking, allow students to practice problem-solving skills such as trial and error (Barr, et al, 2011). Valerie Barr and Chris Stephenson describe computational thinking patterns across disciplines in a 2011 ACM Inroads article However Conrad Wolfram has argued that computational thinking should be taught as a distinct subject.
Computational thinking The phrase "computational thinking" was brought to the forefront of the computer science community as a result of an ACM Communications article on the subject by Jeannette Wing. The article suggested that thinking computationally was a fundamental skill for everyone, not just computer scientists, and argued for the importance of integrating computational ideas into other disciplines.
Computational thinking The concept of Computational Thinking has been criticized as too vague, as it's rarely made clear how it is different from other forms of thought. Some computer scientists worry about the promotion of Computational Thinking as a substitute for a broader computer science education, as computational thinking represents just one small part of the field. Others worry that the emphasis on Computational Thinking encourages computer scientists to think too narrowly about the problems they can solve, thus avoiding the social, ethical and environmental implications of the technology they create.
Computational thinking Computational Thinking (CT) is the thought processes involved in formulating a problem and expressing its solution(s) in such a way that a computer—human or machine—can effectively carry out. Computational Thinking is an iterative process based on three stages: 1) Problem Formulation (abstraction), 2) Solution Expression (automation), and 3) Solution Execution & Evaluation (analyses) captured by the figure to the right. The term "computational thinking" was first used by Seymour Papert in 1980 and again in 1996. Computational thinking can be used to algorithmically solve complicated problems of scale, and is often used to realize large improvements in efficiency.
Scene description language Some scene description language may include variables, constants, conditional statements, while loops and for loops.
Computational thinking Carnegie Mellon University in Pittsburgh has a Center for Computational Thinking. The Center's major activity is conducting PROBEs or PROBlem-oriented Explorations. These PROBEs are experiments that apply novel computing concepts to problems to show the value of computational thinking. A PROBE experiment is generally a collaboration between a computer scientist and an expert in the field to be studied. The experiment typically runs for a year. In general, a PROBE will seek to find a solution for a broadly applicable problem and avoid narrowly focused issues. Some examples of PROBE experiments are optimal kidney transplant logistics and how to create drugs that do not breed drug-resistant viruses.
Conditional sentence While the material conditional operator used in logic (i.e.formula_1) is sometimes read aloud in the form of a conditional sentence (i.e. "if "p", then "q""), the intuitive interpretation of conditional statements in natural language does not always correspond to the definition of this mathematical relation. Modelling the meaning of real conditional statements requires the definition of an indicative conditional, and contrary-to-fact statements require a counterfactual conditional operator, formalized in modal logic.
Indicative conditional The material conditional does not always function in accordance with everyday if-then reasoning. Therefore there are drawbacks with using the material conditional to represent if-then statements.
Material conditional Conditional statements may be nested such that either or both of the antecedent or the consequent may themselves be conditional statements. In the example both the antecedent and the consequent are conditional statements.
Computational thinking As far as a physical facility, in Central New Jersey, there is a small institution, named Storming Robots, offering technology programs to Grade 4 to 12 with an emphasis on Algorithmic and Computational Thinking via robotics projects throughout the school year. Students may follow its road map starting from Grade 4 until they graduate to college.
True and false (commands) The commands are usually employed in conditional statements and loops of shell scripts. For example, the following shell script repeats the "echo hello" loop until interrupted:
Conditional loop A conditional loop has the potential to become an infinite loop when nothing in the loop's body can affect the outcome of the loop's conditional statement. However, infinite loops can sometimes be used purposely, often with an exit from the loop built into the loop implementation for every computer language, but many share the same basic structure and/or concept. The While loop and the For loop are the two most common types of conditional loops in most programming languages.
VBScript Control structures include the usual iterative and conditional Do Loops, If-Then-Else statements, and Case statements, with some more complex variants, such as ElseIf and nested control structures.
Mustache (template system) Mustache is described as a "logic-less" system because it lacks any explicit control flow statements, like "if" and "else" conditionals or for loops; however, both looping and conditional evaluation can be achieved using section tags processing lists and lambdas.
Embedded C Embedded C uses most of the syntax and semantics of standard C, e.g., main() function, variable definition, datatype declaration, conditional statements (if, switch case), loops (while, for), functions, arrays and strings, structures and union, bit operations, macros, etc.
Computational thinking There are a handful of online institutions which provide curriculum, and other related resources to build and strengthen pre-college students with Computational Thinking, Analysis and Problems Solving. One prominent one is the Carnegie Mellon Robotics Academy. It offers training sessions for both pre-college students, as well as teachers. CMU's programs exercise instructional scaffolding methods via engineering process. There is also another online site named legoengineering.com. offering similar resources.
If and only if In that it is biconditional, the connective can be likened to the standard material conditional ("only if", equal to "if ... then") combined with its reverse ("if"); hence the name. The result is that the truth of either one of the connected statements requires the truth of the other (i.e. either both statements are true, or both are false). It is controversial whether the connective thus defined is properly rendered by the English "if and only if", with its pre-existing meaning. There is nothing to stop one from "stipulating" that we may read this connective as "only if and if", although this may lead to confusion.
Computational thinking The characteristics that define computational thinking are decomposition, pattern recognition / data representation, generalization/abstraction, and algorithms. By decomposing a problem, identifying the variables involved using data representation, and creating algorithms, a generic solution results. The generic solution is a generalization or abstraction that can be used to solve a multitude of variations of the initial problem.
Speakeasy (computational environment) The vector-oriented statements avoid writing programs for such loops and are much faster than them.