Programming Constructs Flashcards

1
Q

Pre-Defined Functions

3

A
  • Random
  • Round
  • Length
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Standard Algorithms

3

A
  • Input Validation
  • Running Total
  • Traversing an Array
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Pre-Defined Functions

Random

A

num = Rnd() * 10

Generates random number between 0 and 10

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

Pre-Defined Functions

Round

A

num = math.round(3.14, 1)

Rounds number to 1 decimal place

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

Pre-Defined Functions

Length

A

Num = len(name)

Value becomes number of letters in name variable

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

Standard Algorithms

Input Validation

A

Do while num > 10
MsgBox(“Error, the number you enter should be equal to or less than 10.)
num = InputBox(“Please enter a number”)
Loop

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

Standard Algorithms

Running Total

A

Total = 0
For counter = 1 to 3
Num = InputBox(“Please enter a number)
Total = Total + Num
Next

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

Standard Algorithms

Traversing an Array

A

For counter = 0 to 3
MsgBox(array(counter))
Next

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