
CHAPTER 10 - INPUT VALIDATION
Presentation
•
Computers
•
8th Grade
•
Practice Problem
•
Medium
Klea h
Used 5+ times
FREE Resource
13 Slides • 18 Questions
1
2
3
4
5
Multiple Choice
What does the acronym GIGO stand for in computing?
Garbage In, Garbage Out
Great Input, Great Output
Good Input, Good Output
General Information, General Output
6
Multiple Choice
What humorous error message did the Apache web server use up to 2006?
ID10T Error
PEBCAK Error
User Error
Keyboard Error
7
Multiple Choice
Programs should be designed to reject bad data because:
It reduces the need for user input.
It allows for more complex algorithms.
It makes the program run faster.
It ensures data integrity and security.
8
9
Fill in the Blanks
What is the gross pay if the number of hours worked is 4000 and the hourly pay rate is 20?
10
Multiple Choice
If a program reads bad data as input, what will it produce as output?
Correct output
No output
Unexpected behavior
Bad output
11
12
Multiple Choice
A program should do the following if the input is invalid:
Shut down immediately
Provide an error message
Ignore the input
Process the input anyway
13
Fill in the Blanks
The process of ensuring that bad input is never accepted is called (all lowercase):
14
15
16
Multiple Select
What messages are displayed if the input score is -5 in the given pseudocode? Select 2:
ERROR: The score cannot be less than 0
Invalid score
Enter the correct score
Score cannot be negative
17
Multiple Choice
In the given pseudocode, what condition is checked in the while loop?
The loop continues while a variable is equal to 1.
The loop continues while a variable is less than 10.
The loop continues while a variable is a negative number.
The loop continues while a variable is greater than 5.
18
Multiple Choice
What is the purpose of an input validation loop as shown in the diagram?
To ensure inputs are valid before processing
To accept all inputs without checking
To display outputs
To terminate the program immediately
19
20
Multiple Choice
The program should accept 'yes' and 'no' in any combination of upper- or lowercase letters because:
it is a standard programming practice.
it ensures user input is flexible and user-friendly.
it reduces the chances of errors.
it complicates the program unnecessarily.
21
22
23
Multiple Choice
The purpose of validating the length of a string is to:
Check for null values
Encrypt the string
Ensure it meets specific requirements
Convert it to a different data type
24
25
Multiple Choice
Defensive programming is a practice in software development that involves:
Writing code that anticipates and handles potential errors and issues.
Writing code without any error handling mechanisms.
Focusing solely on performance optimization.
Ignoring potential errors and focusing only on the main functionality.
26
Multiple Choice
Which of the following is an example of an obvious input error?
Empty Input
Entering a string instead of an integer
B) Negative numbers for price
All of the above
27
Multiple Choice
An example of a not so obvious input error is:
Typing in the wrong email address
Forgetting to save a file
Entering a wrong password
Pressing Enter key without typing any value
28
29
Multiple Choice
For a U.S. address, what should the state abbreviation be?
A number
A three-character string
Any string
A valid two-character string
30
Multiple Choice
For a U.S. address, the ZIP code should be a 5- or 9-digit number. True or False?
True
False
31
Fill in the Blanks
Dates should be checked for validity. For example, the date February 29 should be accepted only in
Show answer
Auto Play
Slide 1 / 31
SLIDE
Similar Resources on Wayground
23 questions
Newton's 3 Laws of Motion
Presentation
•
8th Grade
24 questions
Review: Watersheds, Estuaries, and Dead Zones
Presentation
•
8th Grade
24 questions
10/17 - Weather Maps and Symbols
Presentation
•
8th Grade
24 questions
Interpreting Linear Graphs
Presentation
•
8th Grade
24 questions
Notes Systems of Equations Graphing
Presentation
•
8th Grade
24 questions
Participles
Presentation
•
8th Grade
25 questions
Explicit vs. Implicit Evidence
Presentation
•
8th Grade
23 questions
Chapter 8, Lesson 2
Presentation
•
8th Grade
Popular Resources on Wayground
10 questions
How much do you know about our Portrait of an Eagle?
Quiz
•
10th Grade
10 questions
Fast Food Slogans
Quiz
•
6th - 8th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
12 questions
Map Skills
Quiz
•
3rd Grade
22 questions
Continents and Oceans
Quiz
•
5th Grade