W1 - Programming Constructs Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What are the 3 programming constructs?

A

Sequence
Branching
Iteration

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

What is sequence?

A

Sequence is code that runs from the top to the bottom in order

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

What is branching? What is the simplest statement?

A

Branching breaks sequence so the program jumps to another line (when a condition is met). An if statement is the simplest way.

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

What is iteration? What is the simplest statement?

A

Iteration is when a line of code is repeated. A while statement is the simplest way.

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

What is procedural programming?

A

The use of sequence, branching and iteration

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

What do input, output and storage mean?

A

Input - collect data from the user
Output - give data to the user
Storage - store data values for later use

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

How is input, output and storage written in JavaScript?

A

let - store
prompt - user input
console.log - output

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

How do you change the data type of x into a string or number in JavaScript?

A

Let x = string (y);

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

How do you identify data types in JavaScript?

A

Console.log(typeof(y));

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