wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Introduction to Algorithms and Programming Concepts

Total questions: 40

Worksheet time: 20mins

Name
Class
Date
1.

What is an algorithm?

a)

A picture the computer displays

b)

A set of steps used to solve a problem

c)

A type of computer hardware

d)

A variable that stores numbers

2.

What is an example of an input?

a)

A label showing text

b)

A user tapping a button

c)

A notifier message

d)

A procedure running

3.

What is an example of an output?

a)

User typing into a textbox

b)

User tapping a button

c)

An image displayed on the screen

d)

The phone vibrating when a condition is met

4.

An event is...

a)

Something that happens and triggers code

b)

A list of values

c)

A loop that runs forever

d)

A type of variable

5.

The block when Button.Click do runs when...

a)

The user types text

b)

The user taps that button

c)

The app starts

d)

The list is updated

6.

Which block stores a value the app can change later?

a)

Procedure block

b)

Event block

c)

Variable block

d)

Output block

7.

Which of the following is the BEST example of output?

a)

A user selecting from a ListPicker

b)

An image displayed on the screen

c)

A user tapping a button

d)

A label showing text

8.

What is procedural abstraction?

a)

Storing data in a list

b)

A simplified version of hardware

c)

Grouping code into a reusable procedure

d)

A way of adding images to your app

9.

Why do programmers use procedures?

a)

To slow down the app

b)

To avoid repeating code

c)

To store pictures

d)

To erase variables

10.

Which of the following is a Boolean expression?

a)

20 + 5

b)

“Hello”

c)

x > 10

d)

3.14

11.

Which block allows a program to make decisions?

a)

Loop

b)

Procedure

c)

If/then/else

d)

Join text

12.

The expression TextBox.Text = "" checks whether...

a)

The user typed a number

b)

The textbox is empty

c)

The textbox is disabled

d)

The textbox should reset

13.

What does set global score to global score + 1 do?

a)

Replaces the score with 0

b)

Adds 1 to the score

c)

Displays the score

d)

Deletes the score

14.

Which BEST describes a variable?

a)

A reusable block of code

b)

A storage container for values

c)

A device event

d)

A screen layout component

15.

In an if/else statement, the else part runs when...

a)

The condition is true

b)

The app crashes

c)

The condition is false

d)

The user clicks reset

16.

Logic that checks multiple conditions in order is called...

a)

Nested loops

b)

Sequential selection

c)

Boolean storage

d)

Data abstraction

17.

The block not (TextBox.Text = "") means...

a)

The textbox is blank

b)

The textbox is not blank

c)

The textbox contains a number

d)

The textbox resets itself

18.

A good reason to use an if/else-if/else structure is...

a)

When you only need one condition

b)

When the program should repeat forever

c)

When output can vary based on conditions

d)

When no conditions are needed

19.

A list is best described as...

a)

One piece of text

b)

A single number

c)

A collection of related values stored together

d)

The output of a loop

20.

What does “add items to list” do?

a)

Removes an item

b)

Adds a value to the end of a list

c)

Sorts the list

d)

Changes the first item only

21.

If a list is [“Red”, “Blue”, “Green”], what does index 2 return?

a)

Red

b)

Blue

c)

Green

d)

Error

22.

Why must FlavorList and VoteList stay aligned?

a)

To keep the app looking nice

b)

So each flavor’s votes match the correct flavor

c)

To prevent errors in the code

d)

To ensure the lists are the same length

23.

What happens when a ListPicker opens?

a)

The list is deleted

b)

The list’s items are shown to the user

c)

A new item is added

d)

A timer starts

24.

What does “index in list” return?

a)

The last item

b)

The location of an item in the list

c)

The list length

d)

Whether the item is a number

25.

If a user selects “Mint” in [“Chocolate”, “Vanilla”, “Mint”], index =

a)

0

b)

1

c)

2

d)

3

26.

What does increasing VoteList[index] by 1 do?

a)

Adds a new flavor

b)

Increases the selected flavor’s vote count

c)

Deletes the flavor

d)

Sorts the list

27.

Why use UPCASE when adding flavors?

a)

It encrypts text

b)

It standardizes comparison

c)

It forces lowercase

d)

It sorts the list

28.

A BEST-SO-FAR loop is used to...

a)

Add items

b)

Find the largest/smallest value

c)

Display images

d)

Reset variables

29.

The design view is used to...

a)

Build the user interface

b)

Store list values

c)

Write algorithms

d)

Configure phone hardware

30.

ListPicker.AfterPicking runs when...

a)

The app starts

b)

The user taps a button

c)

The user selects an item

d)

A timer ends

31.

An example of output is...

a)

A textbox waiting for input

b)

A label displaying text

c)

A button before it’s tapped

d)

A screen changing color

32.

A TextBox is used primarily for...

a)

Displaying messages

b)

Letting the user enter text

c)

Showing lists

d)

Running procedures

33.

Which block updates what the user sees?

a)

get global

b)

set Label.Text to

c)

add items to list

d)

call procedure

34.

The join block...

a)

Adds numbers

b)

Combines text pieces

c)

Sorts values

d)

Stores images

35.

A notifier is used to...

a)

Add data

b)

Display alerts

c)

Run loops

d)

Control sprites

36.

Event-driven programming means...

a)

Code runs only in order

b)

Code runs when events happen

c)

Code never stops

d)

Code ignores user actions

37.

Which conditional checks if the user typed a number?

a)

text = ""

b)

is number?(text)

c)

text > 100

d)

list is empty

38.

Which block prevents voting without a flavor selected?

a)

if selection = ""

b)

join text

c)

disable button

d)

reset screen

39.

A reset button should use which event?

a)

ListPicker.AfterPicking

b)

Button.Click

c)

Screen.Initialize

d)

Notifier.AfterChoosing

40.

Using one procedure multiple times is an example of...

a)

List storage

b)

Event handling

c)

Procedural abstraction

d)

Variable scope