Search Header Logo

U4L2_3

Authored by Jess Violette

Computers

10th - 12th Grade

Used 3+ times

U4L2_3
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Use the image to predict what will appear in the Debug Console after the downButton is clicked twice.

73 F

23 C

71 F

22 C

73

23

71

22

23

73

22

71

nothing or not enough information

Answer explanation

Media Image

the first time the downButton is clicked the tempF variable becomes 73, the tempC value is calculated to 23, the tempC value appears in the Debug Console (23), and then the tempF value populates the Debug Console

repeat with 2nd click of down button

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

What will appear in the Debug Console when you run this program?

23

73

75

24

73

23

nothing or not enough information

Answer explanation

Media Image

the Debug Console is only updated in the onEvent if/when the down button is clicked. Until the button is clicked, nothing will appear in the Debug Console.

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Predict what will appear in the Debug Console when the upButton is clicked.

71

76

77

nothing or not enough information

Answer explanation

Media Image

There is no onEvent for the upButton in this snippet, therefore there is not enough information to determine what, if anything, will appear in the Debug Console.

4.

FILL IN THE BLANK QUESTION

1 min • 1 pt

A _________ is a debugging tool that allows you to see your variables update while the program runs, making it easier to see what they are doing.

Answer explanation

Media Image

WATCHER

You can add watchers for any variable or object property by typing the name of a variable in the box and clicking the blue "add" button. If your program isn't running or the variable hasn't yet been assigned a value, the watcher will report a value of undefined. This isn't an error, it just means that the variable hasn't yet been assigned a value.

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What does this command do in a code?

captures data entered by the user, by reading data from a textInput() screen element

retrieves a string from within the code

connects to a helpful messaging app that keeps you connected with the people who matter most

I don't know

Answer explanation

Media Image

getText() captures data entered into the App by the user, by reading data from a screen element such as a textInput(), button(), or textLabel().

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which is an example of concatenation?

a very persuasive and persistent feline

setProperty("dollarsLabel",

"text",

"$")

onEvent("addOneButton",

"click",

function()

userName = "Hi, "

+

getText("nameInput")

+

" !"

Answer explanation

Media Image

In formal language theory and computer programming, string concatenation is the operation of joining character strings end-to-end. For example, the concatenation of "snow" and "ball" is "snowball".

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following is an example of a "counter pattern"?

onEvent("upButton",

"click",

function(){

temp = 70

onEvent("upButton",

"click",

function(){

temp = temp + 2

onEvent("upButton",

"click",

function(){

counter

onEvent("upButton",

"click",

function(){

pattern 123123...

Answer explanation

Media Image

in this example every time the upButton is clicked, the value stored in the temp variable (plastic baggie) is replaced with a number that is two more than the previous number. therefore each time the button is clicked, the variable is updating as though it is COUNTING by 2

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?