Lesson 4 – If/While

Intro:
EA Sports called your office. They want you to design their next game

What you will learn:

  • Primarily
    • If activity
    • While activity
  • Secondarily:
    • Integer and string variables
    • Asign activity

Client name:
EA Sports

Process Name:
Guessing Game

Description:
Create a game that:

  • Asign a “secret” integer variable between 1-100
  • Take a user input (a number between 1-100)
  • Check if the user input equals the secret variable
  • If yes the user wins
  • Else ask for a new number (and tell the user, if the guess was too high or too low

Add comment

Your email address will not be published. Required fields are marked *

Newsletter from Anders Jensen