Lesson Modules
Teaching Tips:
- Tell students that conditionals in programming consist of if-statements, else-statements, and if-else statements. Have them talk in groups and try to come up with what one of those terms means. Examples work too! Show the following video and ask for observations, thoughts, and questions:
Video: Bill Gates Explains IF & IF/ELSE Statements
The link to the video is also in the ClassView menu so you can project it to the class.
Teaching Tips:
- At this point, most students have a favorite card game. As a group, they will need to write directions and rules to the game using only if, if-else, and else statements. This can be done as pseudocode or in something more visual like a flowchart. When time is called, have the group leave their instructions with the game and then rotate to where the group to their left was sitting. They will then need to play the game in front of them using the conditional directions and rules that were left.
- Which groups were successfully able to play their game? What helped them out? Which groups were not successfully able to play the game? What problems did they run into? What do they think a computer or robot would do in that situation and how would they fix it?
Choose a card game with your group and write directions and rules for the game using only if, if-else, and else statements
Teaching Tips:
- Ask students to use pseudocode to explain to a partner what they did in their own words and the appropriate academic language.
- For an extra challenge, keep moving the landing pads farther apart so students can modify their code to change their distance (this can be done with variables!)
- Having problems with the flight? This can be caused by an imbalance in the motors. Check out this page.
Challenge
You get a challenge! Create another if statement where if your variable is greater than 14, it will be set to 11. If your variable not greater than 14, it will be set to 32.
Not sure what to do? You can start with your current code, including the else if statement. You might need to use another one!
Extra Challenge*
*(Check "Explore" of "Flight movements with CoDrone Lite")
Activity: Decide
Have your CoDrone land on two different landings pads! No pressure, but you can only change the value of your variable by 1.
Challenge Rules:
- The course should be set up in a T shape, with the start at the bottom of the T and the landing pads at the top ends of the T.
- The landing pads should be the same distance from the starting point.
- Your CoDrone should travel up the middle of the T, turn towards a landing pad, and then fly to and land on the landing pad.
Teaching Tips: