Unit 2 Lab 3
Making Decisions
In this lab, you will develop tools to help solve word puzzles by searching for words that match specific characteristics.
What's a Predicate?
Vocabulary
Click each word to view the definition.
Input type
The input type (often called domain by programmers) of a function is the type of data that it accepts as input.
Output type
The output type (often called range) of a function is the type of data that it reports as output.
Selection
Selection means deciding (selecting) which part of an algorithm to run based on whether a condition is true or false.
Combining Predicates
Self-Check
Unit 2 Lab 3: Combining Predicates
Click to access page.
Combining Conditionals
Vocabulary
Click each word to view the definition.
Nested conditional statement
A nested conditional statement is an if or if else statement inside the else part of another if else statement. If the predicate of the outer if else statement is false, then inner (nested) conditional statement will test its predicate and decide what to do.
Boolean Expression Experiment
Self -Check
Unit 2 Lab 3: Boolean Expression Experiment
Boolean Expression Experiment Part II
Keeping Items From a List
Vocabulary
Click each word to view the definition.
String
A string is an ordered sequence of characters.
Index
You've already learned the word index for the position of an element in a list. The same word is used for the position of a character in a string (for example, a letter in a word). So the first input to letter is the index.