Deck 3: Ifthenelse Control Structure

ملء الشاشة (f)
exit full mode
سؤال
A diamond shape symbol on a program flowchart represents a decision to be made.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
The keyword ELSE is not needed when writing the pseudcode of a null ELSE.
سؤال
If the variable named ANSWER has a value of 1,what will be output after the instructions corresponding to the following pseudocode are executed?
IF ANSWER =1THEN= 1 \mathrm { THEN } Write "Hello"
(ELSE)
ENDIF\mathrm { ENDIF }
IF ANSWER =2= 2 THEN
Write "Goodbye"
ELSE
Write "Good day",
ENDIF

A)Hello
B)Goodbye
C)Good day
D)both a and c
سؤال
Which of the following terms is an example of a character-string constant?

A)123
B)ABC
C)GRADE
D)none of the above
سؤال
Which program flowcharting symbol is used as a collector,emphasizing the single exit point of an IFTHEN control structure?

A)decision
B)connector
C)terminal interrupt
D)process
سؤال
An algorithm can be expressed by the use of an informal language called

A)BASIC
B)Visual Basic
C)pseudocode
D)flowcharting
سؤال
If the variable named AVG has a value of 73,what is the value of GRADE after the instructions corresponding to the following pseudocode are executed?
IF AVG>93THEN\mathrm { AVG } > 93 \mathrm { THEN }
GRADE == "A"
ELSE
GRADE == "B"
ENDIF
IF AVG>73\mathrm { AVG } > 73 THEN
GRADE == "C"
ELSE
GRADE == "F"
ENDIF

A)A
B)B
C)C
D)F
سؤال
If the variable named AVG has a value of 93,what is the value of GRADE after the instructions corresponding to the following pseudocode are executed?
IF AVG>93A V G > 93 THEN
GRADE = "A"
ELSE
IF AVG>83A V G > 83 THEN
ELSE  GRADE = "B"  GRADE = "P", \begin{array} { l } \text { GRADE } = \text { "B" } \\ \text { GRADE } = \text { "P", } \end{array}
ENDIF
ENDIF

A)A
B)B
C)C
D)F
سؤال
Which program flowcharting symbol is used to indicate a choice between two alternative paths?

A)process
B)general input/output
C)terminal interrupt
D)decision
سؤال
If the variable named AVG has a value of 73,what is the value of GRADE after the instructions corresponding to the following pseudocode are executed?
IF AVG >93> 93 THEN
GRADE = "A"
ELSE
IF AVG>83\mathrm { AVG } > 83 THEN
GRADE = "B"
ELSE
GRADE = "P"
ENDIF
ENDIF

A)A
B)B
C)P
D)none of the above
سؤال
The no-function condition is usually called a null ELSE.
سؤال
If the variable named ANSWER has a value of 1,what will be output after the instructions corresponding to the following pseudocode are executed?
IF ANSWER =1= 1 THEN
Write "Hello"
ELSE
IF ANSWER =2= 2 THEN
Write "Goodbye"
ELSE
Write "Good day"
ENDIF
ENDIF

A)Hello
B)Goodbye
C)Good day
D)both a and c
سؤال
If no special alternative action is required when the condition tested in an IFTHENELSE pattern is false,we refer to this as a

A)null ELSE
B)IFTHENELSE
C)conditional branch
D)nested pattern
سؤال
The following pseudocode
IF AVG >93> 93 THEN GRADE = "A" ELSE
GRADE = "B"
ENDIF
IF AVG>73\mathrm { AVG } > 73 THEN
GRADE == " C\mathrm { C } ",
ELSE
GRADE = "F "
ENDIF
Represents a

A)sequential IFTHENELSE pattern
B)nested IFTHENELSE pattern
C)null IFTHENELSE pattern
D)simple IFTHENELSE pattern
سؤال
In a nested IFTHENELSE pattern,all the tests are always made,one after the other.
سؤال
In a sequential IFTHENELSE pattern,whether tests after the first one are made depends upon the outcome of the preceding tests.
سؤال
The following pseudocode
IF AVG >93> 93 THEN
GRADE == "A"
ELSE
IF AVG>83A V G > 83 THEN
GRADE == "B"
ELSE
GRADE == "P"
ENDIF
ENDIF
Represents a

A)sequential IFTHENELSE pattern
B)nested IFTHENELSE pattern
C)null IFTHENELSE pattern
D)simple IFTHENELSE pattern
سؤال
The following pseudocode
IF AVG >93> 93 THEN GRADE == "A"
(ELSE)
ENDIF
Represents a

A)sequential IFTHENELSE pattern
B)nested IFTHENELSE pattern
C)null IFTHENELSE pattern
D)simple IFTHENELSE pattern
سؤال
If the variable named AVG has a value of 93,what is the value of GRADE after the instructions corresponding to the following pseudocode are executed?
IF AVG>93THEN\mathrm { AVG } > 93 \mathrm { THEN }
 GLSA  GRE = "A"  GRADE =" B"\begin{array} { l } \text { GLSA } \quad \text { GRE } = \text { "A" } \\ \text { GRADE } = " \mathrm {~B} " \end{array}
ENDIF
IF AVG>73THEN\mathrm { AVG } > 73 \mathrm { THEN }
GRADE == " C\mathrm { C } ",
ELSE
GRADE = "F"'
ENDIF

A)A
B)B
C)C
D)F
سؤال
If the variable named GRADE has a value of 95,which of the following statements will cause the line
95 is above average
To be output?

A)Write "GRADE is above average"
B)Write GRADE is above average
C)Write GRADE,"is above average"
D)Write "GRADE,is above average"
سؤال
A connector symbol is placed at the entry point of an IFTHENELSE control structure.
سؤال
The value of a character-string constant is usually enclosed in either single or double quotes.
سؤال
Indentation is used in pseudocode to improve readability.
سؤال
A nested IFTHENELSE pattern cannot contain a null ELSE.
سؤال
The decision point in an IFTHENELSE statement is called an unconditional branch.
سؤال
Pseudocode is a graphic depiction of an algorithm.
سؤال
The statements Write A and Write "A" will always produce the same output.
سؤال
Pseudocode may be a more suitable tool than flowcharting when working on complex problems.
سؤال
In a nested IFTHENELSE pattern,it is probable that many of the tests will be skipped.
سؤال
There is no ANSI-approved standard for pseudocode.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/30
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 3: Ifthenelse Control Structure
1
A diamond shape symbol on a program flowchart represents a decision to be made.
True
2
The keyword ELSE is not needed when writing the pseudcode of a null ELSE.
False
3
If the variable named ANSWER has a value of 1,what will be output after the instructions corresponding to the following pseudocode are executed?
IF ANSWER =1THEN= 1 \mathrm { THEN } Write "Hello"
(ELSE)
ENDIF\mathrm { ENDIF }
IF ANSWER =2= 2 THEN
Write "Goodbye"
ELSE
Write "Good day",
ENDIF

A)Hello
B)Goodbye
C)Good day
D)both a and c
both a and c
4
Which of the following terms is an example of a character-string constant?

A)123
B)ABC
C)GRADE
D)none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
5
Which program flowcharting symbol is used as a collector,emphasizing the single exit point of an IFTHEN control structure?

A)decision
B)connector
C)terminal interrupt
D)process
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
6
An algorithm can be expressed by the use of an informal language called

A)BASIC
B)Visual Basic
C)pseudocode
D)flowcharting
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
7
If the variable named AVG has a value of 73,what is the value of GRADE after the instructions corresponding to the following pseudocode are executed?
IF AVG>93THEN\mathrm { AVG } > 93 \mathrm { THEN }
GRADE == "A"
ELSE
GRADE == "B"
ENDIF
IF AVG>73\mathrm { AVG } > 73 THEN
GRADE == "C"
ELSE
GRADE == "F"
ENDIF

A)A
B)B
C)C
D)F
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
8
If the variable named AVG has a value of 93,what is the value of GRADE after the instructions corresponding to the following pseudocode are executed?
IF AVG>93A V G > 93 THEN
GRADE = "A"
ELSE
IF AVG>83A V G > 83 THEN
ELSE  GRADE = "B"  GRADE = "P", \begin{array} { l } \text { GRADE } = \text { "B" } \\ \text { GRADE } = \text { "P", } \end{array}
ENDIF
ENDIF

A)A
B)B
C)C
D)F
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
9
Which program flowcharting symbol is used to indicate a choice between two alternative paths?

A)process
B)general input/output
C)terminal interrupt
D)decision
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
10
If the variable named AVG has a value of 73,what is the value of GRADE after the instructions corresponding to the following pseudocode are executed?
IF AVG >93> 93 THEN
GRADE = "A"
ELSE
IF AVG>83\mathrm { AVG } > 83 THEN
GRADE = "B"
ELSE
GRADE = "P"
ENDIF
ENDIF

A)A
B)B
C)P
D)none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
11
The no-function condition is usually called a null ELSE.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
12
If the variable named ANSWER has a value of 1,what will be output after the instructions corresponding to the following pseudocode are executed?
IF ANSWER =1= 1 THEN
Write "Hello"
ELSE
IF ANSWER =2= 2 THEN
Write "Goodbye"
ELSE
Write "Good day"
ENDIF
ENDIF

A)Hello
B)Goodbye
C)Good day
D)both a and c
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
13
If no special alternative action is required when the condition tested in an IFTHENELSE pattern is false,we refer to this as a

A)null ELSE
B)IFTHENELSE
C)conditional branch
D)nested pattern
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
14
The following pseudocode
IF AVG >93> 93 THEN GRADE = "A" ELSE
GRADE = "B"
ENDIF
IF AVG>73\mathrm { AVG } > 73 THEN
GRADE == " C\mathrm { C } ",
ELSE
GRADE = "F "
ENDIF
Represents a

A)sequential IFTHENELSE pattern
B)nested IFTHENELSE pattern
C)null IFTHENELSE pattern
D)simple IFTHENELSE pattern
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
15
In a nested IFTHENELSE pattern,all the tests are always made,one after the other.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
16
In a sequential IFTHENELSE pattern,whether tests after the first one are made depends upon the outcome of the preceding tests.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
17
The following pseudocode
IF AVG >93> 93 THEN
GRADE == "A"
ELSE
IF AVG>83A V G > 83 THEN
GRADE == "B"
ELSE
GRADE == "P"
ENDIF
ENDIF
Represents a

A)sequential IFTHENELSE pattern
B)nested IFTHENELSE pattern
C)null IFTHENELSE pattern
D)simple IFTHENELSE pattern
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
18
The following pseudocode
IF AVG >93> 93 THEN GRADE == "A"
(ELSE)
ENDIF
Represents a

A)sequential IFTHENELSE pattern
B)nested IFTHENELSE pattern
C)null IFTHENELSE pattern
D)simple IFTHENELSE pattern
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
19
If the variable named AVG has a value of 93,what is the value of GRADE after the instructions corresponding to the following pseudocode are executed?
IF AVG>93THEN\mathrm { AVG } > 93 \mathrm { THEN }
 GLSA  GRE = "A"  GRADE =" B"\begin{array} { l } \text { GLSA } \quad \text { GRE } = \text { "A" } \\ \text { GRADE } = " \mathrm {~B} " \end{array}
ENDIF
IF AVG>73THEN\mathrm { AVG } > 73 \mathrm { THEN }
GRADE == " C\mathrm { C } ",
ELSE
GRADE = "F"'
ENDIF

A)A
B)B
C)C
D)F
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
20
If the variable named GRADE has a value of 95,which of the following statements will cause the line
95 is above average
To be output?

A)Write "GRADE is above average"
B)Write GRADE is above average
C)Write GRADE,"is above average"
D)Write "GRADE,is above average"
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
21
A connector symbol is placed at the entry point of an IFTHENELSE control structure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
22
The value of a character-string constant is usually enclosed in either single or double quotes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
23
Indentation is used in pseudocode to improve readability.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
24
A nested IFTHENELSE pattern cannot contain a null ELSE.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
25
The decision point in an IFTHENELSE statement is called an unconditional branch.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
26
Pseudocode is a graphic depiction of an algorithm.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
27
The statements Write A and Write "A" will always produce the same output.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
28
Pseudocode may be a more suitable tool than flowcharting when working on complex problems.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
29
In a nested IFTHENELSE pattern,it is probable that many of the tests will be skipped.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
30
There is no ANSI-approved standard for pseudocode.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.