APCSP - Unit 3 Flashcards

1
Q

Why is using a variable an example of abstraction?

A

This is because a variable does not have a specific value, it can be set to any number or value that the user chooses. It can represent lots of different values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

By default, how are components laid out in App Inventor?

A

Vertically

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does Fill parent do?

A

Let the button/UI component fill the area allotted on the screen. If it is width fill parent it will fit the width of the screen. If you do height fill parent it will fill the height of the screen.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

List 2 valid App Inventor variable names.

A

firstName, and lastName

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the following APCSP 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

3
2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What will happen if you ask for an index of 10 in a list that only has an index of 9?

A

The App Inventor server would crash because there is no item at that index.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is an event handler?

A

A block of code that reacts to an event.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What type of data must a global destination variable be if it uses a ListPicker?

A

List

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is true about data compression?

A

There are trade-offs involved in choosing a compression technique.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

When testing software, it is important to test critical values or boundary values–both valid and invalid values at the extremes of a range of legal values. In an app where the user enters a number for the month of the year, what would be appropriate boundary values to check?

A

0 and 1, also 12 and 13.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Define refactoring

A

Restructuring a program to make it efficient without changing its basic behavior.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

RELEARN FLIPPED BITS

A

IN RUNESTONE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How should you name a button? For example how would you name a button that is used to clear the screen?

A

ButtonRefresh
RefreshButton

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is true about a TinyDb component?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

A digital photo file contains data representing the level of red, green, and blue for each pixel in the photo. The file also contains metadata that describes the date and geographic location where the photo was taken. What goal would analyzing the metadata be more appropriate than analyzing the data?

A

Determining the likelihood that the photo was taken at a particular public event.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Define algorithm

A

A formula or set of steps for solving a particular problem.

17
Q

Define analog

A

A device or system that represents changing values as continuously variable physical quantities.

18
Q

Define cloud computing

A

Relies on sharing resources rather than having a local server handle apps.

19
Q

Define cryptography

A

Art of protecting information by transforming it into an unreadable format.

20
Q

Define lossless comrpession

A

Data compression techniques in which data is not lost.

21
Q

Define lossy compression

A

Data compression technique in which some data is lost.

22
Q

Define megabyte

A

Used to describe data storage, 1,048,576 bytes.

23
Q

Define megapixel

A

One million picture elements used to reference the resolution of a graphics device.

24
Q

Define persistence

A

Ability to store data permanently like a Word document or your password.

25
Q

What is a pixel?

A

Short for a picture elements, a single point in a graphic image.