Conditional Logic: Using 'if' Statements for Story Branches
Students will use 'if' statements to create different story branches based on player choices.
What you'll learn
- Identify the three parts of an 'if' statement (condition, 'then' action, and optional 'else' action) in at least three different code examples with 100% accuracy.
- Explain how different comparison operators (==, !=, >, =,
- Apply 'if' statements to create a simple story with at least two branching paths, where the path taken depends on user input, and successfully run the program without syntax errors.
- Solve a debugging problem by identifying and correcting errors in a pre-written code snippet that uses 'if' statements to control story flow, achieving a functional program within 10 minutes.
Tutorial Preview
Introduction & Learning Objectives
Key Concepts & Vocabulary
Core Syntax & Patterns
4 more steps in this tutorial
Sign up free to access the complete tutorial with worked examples and practice.
Sign Up Free to ContinueSample Practice Questions
Want to practice and check your answers?
Sign up to access all questions with instant feedback, explanations, and progress tracking.
Start Practicing FreeMore from Interactive Storytelling with Python: Introducing Game Development
Computer Science for other grades
Frequently asked questions
What grade level is "Conditional Logic: Using 'if' Statements for Story Branches"?
Conditional Logic: Using 'if' Statements for Story Branches is a Grade 8 Computer Science lesson on ExcelOS.
What will I learn in Conditional Logic: Using 'if' Statements for Story Branches?
You'll be able to: Identify the three parts of an 'if' statement (condition, 'then' action, and optional 'else' action) in at least three different code examples with 100% accuracy; Explain how different comparison operators (==, !=, >, =,; Apply….
Is "Conditional Logic: Using 'if' Statements for Story Branches" free to practice?
Yes. You can read the tutorial preview for free, and signing up for a free ExcelOS account unlocks the full tutorial and all practice questions with instant feedback.
How many practice questions are included with Conditional Logic: Using 'if' Statements for Story Branches?
This lesson includes 27 practice questions across multiple difficulty levels, each with instant feedback and explanations.