Arrays Practice Programs
Activity
Create the following programs to practice using arrays in your programs:
Tasks
Arrays Challenge 1
- Create a game that uses Arrays of images.
- Randomly spawn an image from the array.
- Use an array to animate a sprite.
Shared project link:
Arrays Challenge 2
- Create a game that mimics a Slot Machine.
- Create a text array of different fruit and 7.
- On Button A pressed, pick 3 random values from the array to display.
- If the user gets a match β display βMatch!β
- If the user gets 7 7 7 β display βJackpot!β
Shared project link:
Practice Program 3
- Create a Magic 8 Ball game to tell peopleβs fortunes.
- Create a list of phrases that are random responses to user questions (Yes, Never, It is likely, etc.).
- Once youβve finished your game, use the Exam Reference Sheet (ERS) to recreate the Array functions, and to remove each phrase after it is used.
Shared project link:
Reflection/Homework
- What challenges did you have when creating the Array practice programs?
- What could you modify or add to improve the program?