Form 13: Variables and Conditionals in Games Exercise

Form 13: Variables and Conditionals in Games

10 minutes 3 views 0 saves EN
Send as Assignment
Form 13: Variables and Conditionals in Games

Explore how variables and conditionals interact to track game values and control gameplay mechanics.

Questions

  1. MultiChoice

    What is a variable in programming?

  2. MultiChoice

    In a game, 'score = score + 10' when player catches coin. What is 'score'?

  3. MultiChoice

    'IF score >= 100 THEN print You Win!'. What triggers 'You Win!'?

  4. WordsBox

    A variable is used to store ____ like scores that can ____ during the game.

  5. MultiChoice

    In a game, lives = 3. Player hits obstacle: 'lives = lives - 1'. What is current lives?

  6. MultiChoice

    'IF lives == 0 THEN Game Over'. When is 'Game Over' displayed?

  7. WordsBox

    Conditionals check variable ____ to trigger game events like ____ or losing.

  8. MultiChoice

    Player collects speed power-up: 'speed = speed * 2'. If original speed was 5, new speed is:

  9. MultiChoice

    Which variable type is best for keeping track of whether a key was collected?

  10. MultiChoice

    'REPEAT UNTIL lives == 0: [Play game turn]'. When does game loop stop?

  11. MultiChoice

    What happens if a game fails to update the score variable when a target is hit?

  12. MultiChoice

    If coin_count = 5 and code runs 'coin_count = coin_count + 1', coin_count becomes: