5.9 Quiz
OBJECTIVES:
OBJECTIVES: By the end of this lesson, students will:
practice retrieving information from a list.
realize that two lists can work together to form a table of related elements.
TEACHER RESOURCES:
Standards
CSTA 2-AP-11: Create clearly named variables that represent different data types and perform operations on their values.
CSTA 2-AP-10: Use flowcharts and/or pseudocode to address complex problems as algorithms.
DO NOW:
How to you think these smart phone apps may use lists?
Messages
Contacts
Email
Camera
Maps
Mini-Lesson (5-10 minutes)
Students will: remix a quiz project; create a question and answer list; pair related items using their index number.
Project (20-30 minutes)
Students love this project. They spend a lot of time on questions, sprites and backdrops. Here are some example quizzes created by students.
Close-Out (5 minutes)
Close-Out (5 minutes)
Discuss the following questions:
Today you created two lists: one for Questions and one for Answers. How did you know which question related to which answer?
Potential Responses
Abstraction hides details at a lower level to simplify complex systems.
It improves efficient and makes code easier to read. It also allows your code to work with a bigger range of scenarios.
E.g. The Madlibs project generated lots of sentence output, form one sentence frame and a variety of two word inputs.Math operators: Addition, subtraction, divide, mod, round.
Mod returns the remainder - useful for telling if a number is odd or even.
Round: rounds to the nearest whole number.
Note: Square root can be changed to 14 other math functions including sin and cosine.
Students use four variables:
Number 1, Number 2: to hold random numbers, used in formulating game question and calculating.
CorrectAnswer: to store the correct math answer
Score: to store the players' score.
Using the Index number ( i.e - the placement on the list).