Sunday

April 19, 2015

April 19, 2015

Posted by **Anonymous** on Wednesday, June 11, 2008 at 5:41pm.

Consider the following selection statement where X is an integer test score between 0 and 100.

input X

if (0 <= X and X < 49)

output "you fail"

else if (50 <= X and X < 70)

output "your grade is" X

output "you did OK"

else if (70 <= X and X < 85)

output "your grade is" X

output "you did well"

else if (85 <= X and X < 100)

output "your grade is" X

output "you did great"

endif

output "how did you do?"

o What will be printed if the input is 0?

o What will be printed if the input is 100?

o What will be printed if the input is 51?

o What will be printed if the user enters ¿Wingding¿?

o Is this design robust? If so, explain why. If not, explain what you can do to make it robust. The design is not robust because there is no explicit assignment of an integer type to the input variable X or check to see if the integer input lies between 0 and 100 (inclusive). So, the program will execute irrespective of the input. Moreover, it does not have a proper output defined at X = 49 and X = 1 ...

o How many levels of nesting are there in this design?

o Give a set of values that will test the normal operation of this program segment. Defend your choices.

o Give a set of test values that will cause each of the branches to be executed.

o Give a set of test values that test the abnormal operation of this program segment.

Please Help!!!!

programming - Consider the following selection statement where X is an integer ...

Part 1 - Consider the following selection statement where X is an integer test ...

Help Help - Consider the following selection statement where X is an integer ...

programming - Can You Please help me understand how to do this and what i have ...

programming - I am in IT/210 and am having problems with the entire class. But ...

programming - Consider the following input and output: INPUT: (((5 + 1) – (7 – 4...

Algorithm Verification - Please give example of algorithm verification.

Computers - Problem-Solving 1. Develop an algorithm or write pseudocode to ...

Information Technology - Develop an algorithm, flow chart and pseudocode that ...

physics - n this problem, we will carry out some steps of the quantum factoring ...