Question: Give me an example of Algorithm Workbench ? ( ) Design an If - Then statement ( or a flowchart with a single alternative decision
Give me an example of Algorithm Workbench
Design an IfThen statement or a flowchart with a single alternative decision
structure that assigns to the variable y and assigns to the variable if the
variable x is greater than
Design an IfThen statement or a flowchart with a single alternative decision
structure that assigns to the variable and assigns to the variable if the
variable a is less than
Design an IfThenElse statement or a flowchart with a dual alternative decision
structure that assigns to the variable b if the variable a is less than
Otherwise, it should assign to the variable b
The following pseudocode contains several nested IfThenElse statements.
Unfortunately, it was written without proper alignment and indentation. Rewrite the
code and use the proper conventions of alignment and indentation.
If score Then
Display "Your grade is F
Else
If score Then
Display "Your grade is D
Else
If score Then
Display "Your grade is C
Else
If score Then
Display "Your grade is B
Else Else
Display "Your grade is A
End If
End If
End If
End If
Design nested decision structures that perform the following: If
is greater
than and amount is less than display the greater of amount and
amount
Rewrite the following IfThenElse If statement as a select case statement.
If selection Then
Display "You selected A
Else If selection Then
Display "You selected
Else If selection Then
Display "You selected
Else If selection Then
Display "You selected
Else
Display "Not good with numbers, eh
End If
Design an IfThenElse statement or a flowchart with a dual alternative decision
structure that displays "Speed is normal" if the speed variable is within the range
of to If speed holds a value outside this range, display "Speed is
abnormal." Design an IfThenElse statement or a flowchart with a dual alternative decision
structure that determines whether the points variable is outside the range of to
If the variable holds a value outside this range it should display "Invalid
points." Otherwise, it should display "Valid points."
Design a case structure that tests the month variable and does the following:
If the month variable is set to it displays "January has days."
If the variable is set to it displays "February has days."
If the month variable is set to it displays "March has days."
If the month variable is set to anything else, it displays "Invalid selection."
Write an IfThen statement that sets the variable hours to when the flag
variable minimum is set.
TIPS ON HOW TO SOLVE:
Use as variables
Wrte an if statement
Similar example:
If Then
End if
Use abc as variables
Wrte an if statement
Sample:
If Then
End if
Use ab as variables
Use an ifelse statement
Sample:
If Then
Else
End If
Use score as a variable
Use an ifElse ifElse ifElse ifEnd ifEnd ifEnd ifEnd if statement
Use 'Program in Chap as a sample.
Use amount as a variable
Use an ifnested ifnested ifElseEnd ifEnd ifEnd if statement
Use selection as a variable
Use Switch or Select'Case :Case :Case :Case :DefaultEnd Switchor Select statement
Use speed as variable
Use if condition AND condition Then Else End if statement
Use points as variable
Use if condition OR condition Then Else End if statementUse points as variable
Use if condition OR condition Then Else End if statement
Use Program in Chap as a sample.
Use month as a variable
Use Switch or SelectCase :Case :Case :DefaultEnd Switchor Select statement
Easy. Write your own code.
Debugging Exercises
Identify a wrong sign a syntax issue
Think about the precedence among!NOT &&ANDII OR operators and the way you can change the precedence.
Reread 'Checking Numeric Ranges' section in Chap
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
