wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

ISPFL8 Endterm Exam

Total questions: 60

Worksheet time: 3600secs

Name
Class
Date
1.
The T1_Tick subroutine cycles through different image bitmaps (ImgH1 to ImgH4) to create an animation. What type of animation technique is likely used here?
a)
Skeletal animation
b)
Sprite sheet animation
c)
Frame-by-frame animation
d)
Procedural animation
2.
The Cek subroutine checks for overlap between the player character and moving objects. This is a basic approach to collision detection. What is a more efficient collision detection method for complex shapes?
a)
Circle colliders
b)
Raycasting
c)
Pixel-perfect collision
d)
Hitbox detection
3.
The game uses boolean variables like Fail and Finish to manage its state. What is a limitation of using boolean variables for complex game logic?
a)
They cannot store numerical values.
b)
They are difficult to understand for other programmers.
c)
They can only represent two states (true or false).
d)
They require a lot of memory space.
4.
How could a loop be used to improve the code for initializing the player character's animation images?
a)
Write a loop to check if each animation image is loaded before proceeding.
b)
Create a loop that reads animation data from a file for each image.
c)
Design a loop that iterates through each image and sets its bitmap for the image view.
d)
Implement a loop to delete unused animation images to save memory.
5.
SoundJump.Play is called within the ButtonJump_Click subroutine. How could sound management be optimized using a sound pool?
a)
Create a separate sound pool for each different sound effect.
b)
Pre-load all sounds into the sound pool at the start of the game.
c)
Modify the sound pitch each time the sound is played.
d)
Check if a sound is already playing before calling SoundJump.Play.
6.
The current code uses separate Initialize subroutines for each animation image. Why does this approach introduce redundancy?
a)
It requires more code to define each image separately.
b)
It wastes memory by storing the same data in multiple variables.
c)
It makes the code harder to debug due to complex logic.
d)
It slows down the game by loading each image individually.
7.
Boolean variables like Fail and Finish are used for game state management. How could state machines be a better solution for complex games?
a)
State machines allow for smoother transitions between animations.
b)
They provide a more organized way to manage multiple game states with transitions.
c)
State machines are easier to understand for beginner programmers.
d)
They require less memory compared to using boolean variables.
8.
The C_Move subroutine utilizes the Rnd function to generate a random movement pattern for the moving objects. What aspect of gameplay does this randomness contribute to?
a)
Improves the visual quality of the graphics.
b)
Introduces an element of surprise and replayability.
c)
Makes the game more efficient by reducing processing power.
d)
Allows for easier collision detection with the player character.
9.
The game utilizes timers (TimerButtonSlidingDown) to control animations. What potential drawback could arise from relying solely on timers for animation control?
a)
Timers cannot be used with multiple animations simultaneously.
b)
Timers are a complex concept for beginner programmers to understand.
c)
Timers can lead to animation delays if the game lags.
d)
Timers require a lot of memory space to store animation data.
10.
The game manages difficulty by increasing the speed (Speed) of moving objects based on the player's score. Describe how a loop could be implemented to adjust the speed gradually over time.
a)
Create a loop that continuously sets the speed to a fixed value.
b)
Design a loop that increments the speed variable by a large amount each time.
c)
Implement a loop that checks the score at regular intervals and adjusts the speed based on a threshold.
d)
Write a loop that modifies the speed based on random values generated throughout the game.
11.
A reusable block of code within a program that performs a specific task is called a:
a)
Subroutine
b)
Timer
c)
Bitmap
d)
Event
12.
Which of the following is used to store a collection of images in a game?
a)
Subroutine
b)
Timer
c)
Array
d)
Event
13.
What is the purpose of a Timer in a game?
a)
To store images
b)
To generate signals at specific intervals
c)
To manage different game states
d)
To detect collisions between objects
14.
A digital image representation where each pixel has a color value is called a:
a)
Subroutine
b)
Timer
c)
Bitmap
d)
Event
15.
What is used to determine if two objects are touching in a game?
a)
Subroutine
b)
Timer
c)
Collision Detection
d)
Event
16.
What is another word for a single image used in a sprite animation?
a)
Subroutine
b)
Frame
c)
Bitmap
d)
Event
17.
What are the elements on the game screen that players interact with?
a)
Code
b)
User Interface
c)
Levels
d)
Characters
18.
What is the process of creating the layout and challenges within a game level called?
a)
Animation
b)
Level Design
c)
Programming
d)
Sound Design
19.
What is a common way to represent the collision area of a complex object in a game?
a)
Sprite
b)
Bounding Box
c)
Bitmap
d)
Timer
20.
What is a sequence of numbers that appears unpredictable used for in games?
a)
To store high scores
b)
Random Number Generation
c)
To control animation speed
d)
To track player health
21.

In our game of Flip Card, the game uses 20 unique card faces.

a)

TRUE

b)

FALSE

22.

Clicking a button reveals the card face image.

a)

TRUE

b)

FALSE

23.

The game keeps track of the first clicked card location (loc1) and button number (bt) even after it's hidden.

a)

TRUE

b)

FALSE

24.

Buttons are disabled after they are clicked.

a)

TRUE

b)

FALSE

25.

Matching all cards automatically restarts the game.

a)

TRUE

b)

FALSE

26.

The "Busy" flag is used to prevent accidental clicks while revealing mismatched cards.

a)

TRUE

b)

FALSE

27.

The code uses absolute positioning for buttons and image views.

a)

TRUE

b)

FALSE

28.

The game displays the backside of the cards before they are revealed.

a)

TRUE

b)

FALSE

29.

The application can be minimized and restored without affecting the game state.

a)

TRUE

b)

FALSE

30.

The game ends when all cards are revealed, regardless of whether they match.

a)

TRUE

b)

FALSE

31.
The _____ subroutine is called whenever the activity is created.
a)
Sub Process_Globals
b)
Sub Activity_Create
c)
Sub Button1_Click
d)
Sub restart
32.
The loc array is an integer array of size _____ likely to store references to card face image names.
a)
10
b)
20
c)
Unpredictable, depends on user clicks.
d)
The code doesn't specify the size.
33.
The calcx subroutine checks a _____ flag to prevent further clicks while revealing cards.
a)
match
b)
visible
c)
busy
d)
Timer1
34.
A timer named _____ is used to hide cards that don't match after they are revealed.
a)
Timer1
b)
Timer2
c)
There are no timers used for hiding cards.
d)
Sub restart
35.
When a card is clicked, the calcx subroutine hides the button using the _____ property based on the button number.
a)
enabled
b)
visible
c)
image
d)
location
36.
The game ends when a variable named _____ reaches a value of 10.
a)
clicks
b)
match
c)
busy
d)
The game never ends.
37.
Images for the card faces are loaded from the application's _____ folder.
a)
External storage
b)
DirAssets
c)
Downloaded online during gameplay.
d)
The code doesn't specify the image source.
38.
Comments in the code suggest the developer might have intended for the mix subroutine to be called _____ during initialization.
a)
Multiple times (current implementation)
b)
Once 2
c)
Not called at all.
d)
The comments don't mention the mix subroutine.
39.
Buttons clicked by the user have a subroutine named _____ attached to them, which handles the click event.
a)
Sub Click
b)
ButtonX_Click (where X is the button number)
c)
All buttons share a single click handler.
d)
Clicking buttons doesn't trigger any subroutines.
40.
The _____ subroutine restarts the game, resetting the board and hiding all cards.
a)
Sub Button_Click
b)
Sub Timer1_Tick
c)
Sub Activity_Resume
d)
Sub restart
41.
True or False: 123X is a valid variable name
a)
TRUE
b)
FALSE
42.
True or False: _FLATUTOO is a valid variable name
a)
TRUE
b)
FALSE
43.
True or False: MWimwa001 is a valid variable name
a)
TRUE
b)
FALSE
44.
True or False: To Day is a valid variable name
a)
TRUE
b)
FALSE
45.
True or False: Y0000Y@# is a valid variable name
a)
TRUE
b)
FALSE
46.
True or False: fat cat is a valid variable name
a)
TRUE
b)
FALSE
47.
True or False: 0_ is a valid variable name
a)
TRUE
b)
FALSE
48.
True or False: X&Y is a valid variable name
a)
TRUE
b)
FALSE
49.
True or False: 1111D is a valid variable name
a)
TRUE
b)
FALSE
50.
True or False: b-a is a valid variable name
a)
TRUE
b)
FALSE
51.

Evaluate this expression: 3 * 3 mod 3

(a)  

52.

Evaluate this expression: 2 + 10 mod 3 * 5

(a)  

53.

Evaluate this expression: 4 * 4 + 3 mod 3 * 3 + 4

(a)  

54.

Evaluate this expression: 8 / (4 mod 8) * 5

(a)  

55.

Evaluate this expression: 2 * 4 + 5 / 2 + 5

(a)  

56.

Evaluate this expression: 4 / 4 * 4 mod 4

(a)  

57.

Evaluate this expression: 5 + 1 - sqr(2) * 2 + 6

(a)  

58.

Evaluate this expression: 6 mod 7 - 1 * 5 mod 7

(a)  

59.

Evaluate this expression: 8 / 2 mod 8 / 2

(a)  

60.

Evaluate this expression: (8 / 2) mod (8 / 2)

(a)