Thursday, January 24, 2019

Increment and Decrement


https://classflow.com/activfoundation/resource/downloadResourceFile?resourceId=a61cdf6fbb584d8c863515d24ab0745c&resourceFileType=CONVERTED Google Classroom
Question of the Day Form


What is a For Loop? What do the increment  and decrement operators do?

Increment i++ add one. Decrement i-- subtract one.



https://classflow.com/activfoundation/resource/downloadResourceFile?resourceId=ba7160ab334f47cea8dfcbfe4500cf68&resourceFileType=CONVERTED
Google Classroom  
Question of the Day Form


What is a For Loop?
What do the increment  and decrement operators do?
Karel Textbook
for (statement 1; statement 2; statement 3) {
  // code block to be executed}
Statement 1 sets a variable before the loop starts (var i = 0).
Statement 2 defines the condition for the loop to run (i must be less than 5).
Statement 3 increases a value (i++) each time the code block in the loop has been executed.  Increment i++ add one. Decrement i-- subtract one.
Complete the Multipage Website test in CodeHS.com.

<head>
  <link rel="stylesheet" type="text/css" href="style.css">
</head>

No comments: