wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Mobile CSP Test Prep Unit 3

Total questions: 18

Worksheet time: 28mins

Name
Class
Date
1.

By default, when you add components to the App Inventor Viewer they are laid out ___________.

a)

Randomly

b)

Horizontally

c)

Vertically

d)

Diagonally

2.

Which value would you set the Width property to if you want your component, e.g., a Button, to fill its container?

a)

Fill Container

b)

Max Pixels

c)

Automatic

d)

Fill Parent

3.

Which of the following would be a good name for a button whose purpose was to allow the view to refresh the screen?

a)

Button1

b)

ButtonOne

c)

ButtonRefresh

d)

B1

e)

RefreshButton

4.

Which of the following would be a valid App Inventor variable name?

a)

5

b)

-5

c)

"user name"

d)

userName

5.

A variable is an abstract symbol that refers to some particular value. Which of the following symbols is a variable?

a)

10

b)

paintBrush

c)

"hello"

d)

True

e)

x

6.

Suppose you initiate dotsize with the block initialize global dotsize to 5. Which block would you use to change the value of dotsize?

a)

Get Global Dotsize

b)

Set Global Dotsize to 10

c)

Initialize Global Dotsize to 5

d)

None of the Above

7.

Using a variable is an example of abstraction because

a)

A variable is more general and more abstract than a specific value such as 5.

b)

A variable is an abstract symbol that can represent lots of different values.

c)

Using a variable instead of a specific value makes an app more generally useful.

d)

Using a variable instead of a specific value makes an app more vague.

8.

What does the following AP CSP pseudocode display? Remember to trace through the code keeping track of the values in a and b after each line of code.

a ← 1 (Set a to 1)

b ← a (Set b to the current value of a)

b ← b + 1 (Add 1 to b)

a ← a + b (Set a to be the current value of

a + b)

DISPLAY(a)

DISPLAY(b)

a)

11

b)

23

c)

32

d)

22

9.

Which set of numbers would encode the letter "c"? You can use the interactive pixel grid above under Practice or in another tab to work this out.

a)

1, 1, 1

0, 3

0, 3

1, 1, 1

1, 1, 1

1, 1, 1

1, 1, 1

1, 1, 1

1, 1, 1

b)

1, 3, 1

0, 1, 3, 1

0, 1, 4

0, 1, 4

0, 1, 3, 1

1, 3, 1

c)

1, 3

0, 1, 3

0, 2, 2

2, 2

3, 1

0, 3, 1

d)

None of the Above

10.

Which of the following is a true statement about data compression?

a)

Data compression is only useful for files being transmitted over the Internet.

b)

No matter what compression technique is used, once a data file is compressed, it cannot be restored to its original state.

c)

Sending a compressed version of a file ensures that the contents of the file cannot be intercepted by an unauthorized user.

d)

There are trade-offs involved in choosing a compression technique for storing and transmitting data.

11.

What does refactoring mean?

a)

Restructuring a program to make it behave differently.

b)

Changing the way the program behaves.

c)

Revising a program to remove bugs.

d)

Restructuring a program without changing its basic behavior.

12.

Find the flipped bit. For this table, identify the bit that was flipped.

1 0 0 1

1 1 1 1

0 0 1 1

0 1 0 0

a)

The bit in row 4 column 4.

b)

The bit in row 4 column 3.

c)

The bit in row 1 column 2.

d)

The bit in row 2 column 2.

13.

Complete the trick.

For this 3 x 3 table of bits, which of the choices below would be the correct 4 x 4 table for being able to detect when bit is flipped.

1 0 0

1 1 1

0 0 1

a)

1 0 0 1

1 1 1 1

0 0 1 1

0 1 0 0

b)

1 0 0 1

1 1 1 1

0 0 1 1

0 1 1 1

c)

1 0 0 1

1 1 1 0

0 0 1 1

0 1 0 1

d)

1 0 0 1

1 1 1 1

0 0 1 1

0 1 0 1

14.

In an odd parity scheme the binary string 1010 1000 would be detected as containing an error

a)

True

b)

False

15.

In an even parity scheme what would the parity bit be for the binary string 001 1011?

a)

1

b)

2

c)

0

d)

-1

16.

What do you suppose would happen if your app asked App Inventor for the item at index 10 in the list shown here? (List has 8 elements)

a)

It would give you the last item in the list.

b)

It would give you the first item in the list.

c)

It would crash because there is no item with that index.

d)

It would ignore your request.

e)

It would give you a random item from the list.

17.

Which of the following statements are true for a TinyDb component.

Choose all that apply.

a)

Data stored in a TinyDb can easily be shared with other devices and users.

b)

Data stored in a TinyDb will persist between different uses of the app.

c)

Data stored in a TinyDb disappears when you quit the app.

d)

Data stored in a TinyDb is stored in the cloud.

e)

Only strings (text) can be stored in a TinyDb.

18.

True or False: It is possible to have an empty list -- i.e., a list with no elements.

a)

True

b)

False