|
Computer Science Home
6th Grade Tech Ed
7th Grade Computer Science
8th Grade Computer Science A
Gmail
Google Drive
Google Classroom
Infinite Campus
Typing.com
(Join Class through Google Classroom)
Schoology
Code.org
Tynker Coding Website
Tynker Resource Page
Tynker Online Support Video Help
Quizlet | Quizlet LIVE
Everfi
Khan Academy
Social Media Tips
Netsmartz
Code HS
Karel the Dog class code: 1251
CSTA Standards
ISTE Standards
|
Guessing Game (7)
Play a game! In this lesson, students will create an interactive quiz, use the “ask” block for user input, and use the “if-then-else” block to check the answer.
New Code Blocks
- : Ask the user a question and wait until the user responds.
- : Return the user’s answer to the last question the program asked.
- : Make the Actor repeat this loop until a true or false [boolean value] determines when the block should stop repeating the code inside it.
- : This is a comparison operator that returns true if the first value is equal to the second value, and returns false otherwise.
- : If the condition is true, then run the code inside the “if” section. Otherwise, run the code inside the “else” section.
- : Make the Actor appear from the Stage.
- : Make the Actor disappear on the Stage.
Vocabulary
- Condition: A logical expression that evaluates to true or false
- Conditional statement: A type of statement that executes different parts of the code based on whether a logical expression evaluates to true or false.
- Watch Bill Gates explain these!
Objectives
you will...
- Use conditional statements
- Create an interactive quiz game
1. Asking Questions Example (Example)
- You will view a project of an alien asking questions. you will need to manually type in their answer at the bottom the the screen.
- Click the red button to move on to the next module.
2. Asking Questions (DIY)
- In this DIY (do-it-yourself) project, you will follow step-by-step directions to program an alien Actor to ask a question and repeat the answer!
- This module introduces the “answer” variable, which is set whenever the user provides an answer to an “ask” block. Here, the “answer” variable is used to make the alien say he loves your favorite food.
- Did you finish early? Make the alien ask more questions.
3. Guessing Game Example (Example)
- You will view a guessing game project where an alien asks the user to guess its number! You will need to manually type in your answer at the bottom the the screen.
4. Guessing Game (DIY)
- In this DIY project, you will program a guessing game, similar to the one they viewed in the previous module.
- Activities include programming the alien to ask a question with answer options, and making the alien respond different to correct and incorrect answers.
- **The “answer” variable gains a new value every time the question is answered--the computer only “remembers” the last value they typed!
5. Find the Hidden Treasure (Puzzle)
- In solve this puzzle module, you will need to program the spaceship to navigate!
- HINT: Include negative values (e.g., “-10”).
6. Create a Quiz Example (Example)
- This module will demonstrate asking a question in Tynker and checking the user’s response.
7. Create a Quiz (DIY)
- In this DIY project, you will apply concepts and code blocks from this lesson to create your own riddle!
- Add a background and a character
- programming the character to say a riddle, and answering the riddle
- Did you finish early?
- There is a bonus section in “Step 11,” where you to make multiple Actors have a funny conversation before programming the Actor to ask a question.
8. Ghostbusters Example (Example)
- You will view a ghost-clicking game, which you will create your own version of in the next module!
- Each ghost will disappear when you click (web) or tap (mobile) on them.
9. Ghostbusters (DIY)
- In this DIY project, you will create a ghost game where the ghosts disappear when the user clicks (web) on them!
- Did you finish early? Bonus activity up in “Step 4” of the tutorial
- Challenge: experiment with your code and make the ghosts come back.
- **Hint: use a “show” code block
U.S. Standards
- K-12 CTSA Computer Science Standards (Revised 2017)
Computer Science Teachers Association:
- 1B-AP-10
- 1B-AP-11
- 1B-AP-12
- 1B-AP-15
- 2-AP-12
- 2-AP-13
- 2-AP-15
- 2-AP-16
- 2-AP-17
CCSS-Math: MP.1
- CCSS-ELA: RF.5.4.A, 6-8.RST.3, 6-8.RST.4, 6-8.RST.7
- CS CA: 3-5.AP.10, 3-5.AP.12, 3-5.AP.13, 3-5.AP.14, 3-5.AP.17, 6-8.AP.12, 6-8.AP.13, 6-8.AP.16, 6-8.AP.17
- ISTE: 1.c, 1.d, 4.d, 5.c, 5.d, 6.b
|