LESSON 5 Flashcards

1
Q

helps a program decide which route to take based on how the condition is evaluated.
You can create test conditions in the form of expressions that evaluates to either
true or false and based on these results you can perform certain actions.

A

CONDITIONAL STATEMENTS

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

TYPES OF CONDITIONAL STATEMENTS

A

1) if statement
2) if…else statement
3) if…elseif…else statement
4) switch statement

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

executes some code if one condition is true.

A

1) if statement

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

executes some code if a condition is true and another code if that condition is
false.

A

2) if…else statement

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

executes different codes for more than two conditions.

A

3) if…elseif…else statement

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

selects one of many blocks of code to be executed

A

4) switch statement

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

In computer Programming, a Loop is used to execute a group of instructions or a
block of code multiple times, without writing it repeatedly. The loop continues as
long as the specified condition is true.

A

LOOPING STATEMENT

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

TYPES OF LOOPING STATEMENTS

A

1) while
2) do…while
3) for
4) foreach

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

loops through a block of code as long as the specified condition is true

A

1) while

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

loops through a block of code once, and then repeats the loop as long as the
specified condition is true

A

2) do…while

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

loops through a block of code a specified number of times

A

3) for

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

loops through a block of code for each element in an array

A

4) foreach

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

function is used to calculate the number of characters inside a string. It
also includes the blank spaces inside the string.

A

strlen()

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

function counts the number of words in string.

A

str_word_count()

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

replaces all occurrences of the search text within the target string.

A

str_replace()

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