CheckPoint Week 6

CheckPoint Week 6 - CheckPoint Week 6 1 What will be printed if the input is 0 Youfail Howdidyoudo 2 What will be printed if the input is 100

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CheckPoint Week 6 1. What will be printed if the input is 0? You fail. How did you do? 2. What will be printed if the input is 100? How did you do? 3. What will be printed if the input is 51? Your grade is 51. You did OK. How did you do? 4. What will be printed if the user enters Wingding The program will terminate because it is expecting an integer value,  and a string value will cause the program to crash. 5. Is this design robust? If so, explain why. If not, explain what you can do to make it robust. No, there is no default condition for Scores >= 100, or scores < 0. Also, 100 is a valid score. Therefore the following should be added : 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
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/17/2011 for the course IT 210 taught by Professor Josephpillera during the Fall '10 term at University of Phoenix.

Page1 / 2

CheckPoint Week 6 - CheckPoint Week 6 1 What will be printed if the input is 0 Youfail Howdidyoudo 2 What will be printed if the input is 100

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online