programming

posted by .

Can You Please help me understand how to do this and what i have to do to solve the problem.... Please!!

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.
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.

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Help Help

    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 …
  2. Part 1

    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 …
  3. Algorithm

    Algorithm Verification 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" …
  4. programming

    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 …
  5. programming

    I am in IT/210 and am having problems with the entire class. But what I am stuck on is as follows: Consider the following statement where X is an integer test score between 0 and 100. input X if (<0=X and X<49) output = "you …
  6. Programming and algorithms

    For each of the following problems, use the top-down modular approach and pseudocode to design a suitable program to solve it. 1. Input names of students from the user, terminated by ZZZ, and create a data file GRADES with records …
  7. statistics

    Can you please tell me how to solve for the following?
  8. Algebra

    Tom took five math tests and got an integer score on each of them. He never scored higher than 90, and his lowest score was the fourth test. If his average score, rounded to the nearest integer, was 82, what is the lowest possible …
  9. Algebra

    Tom took five math tests and got an integer score on each of them. He never scored higher than 90, and his lowest score was the fourth test. If his average score, rounded to the nearest integer, was 82, what is the lowest possible …
  10. statistics

    1. Suppose you administered an anxiety test to a large sample of people and obtained normally distributed scores with a mean of 45 and a standard deviation of 4. Do not use the web calculator to answer the following questions. Instead, …

More Similar Questions