A programmer is designing a weather application that displays a current forecast. Which representation best applies abstraction for this purpose?
1 Computational Thinking and Problem Solving Online Quiz Questions
Use this free practice quiz with 20 questions to review 1 Computational Thinking and Problem Solving, test your knowledge, and prepare for your next test or exam.
Which set contains the three parts of a computational solution described in the material?
- A
A problem, a representation, and a process
- B
A computer, a programming language, and a network
- C
A user interface, a database, and a printer
- D
An input device, an operating system, and a file
Breaking a complex problem into smaller, manageable subproblems is called . A separately organized part of a system is called a .
Using the rule Fahrenheit=Celsius×59+32, what is the equivalent of 20 degrees Celsius? Enter the value in degrees Fahrenheit.
When testing an algorithm, cases at the limits are called , while cases with unacceptable or malformed inputs are called .
Which choices are the three parts of a computational solution? Select all correct choices.
- A
A clearly stated task or question
- B
A useful description of the input, relevant information, and desired output
- C
A precise method that transforms the input into the output
- D
A specific brand of computer hardware
- E
A particular programming language
Which are advantages of a sensible modular design? Select all correct choices.
- A
Smaller parts are easier to understand
- B
Errors are easier to locate
- C
Components can be reused
- D
Different people can work on different components
- E
Every system automatically becomes simpler when divided into any number of parts
Design and describe an algorithm that determines whether a student qualifies for a certificate when the average of three scores must be at least 70 and no individual score may be below 50. Include important test cases.
A route-planning problem needs to model locations and the connections between them. Which representation most directly exposes these relationships for an algorithm?
- A
A single unsorted text paragraph
- B
A list containing only the names of locations
- C
A graph with locations as vertices and connections as edges
- D
A collection of unrelated images
A program executes without crashing, but it reports that a student qualifies even though one score is below the required minimum. What type of error is this?
- A
A missing punctuation mark prevents the program from being parsed
- B
The program attempts an operation that fails while it is running
- C
The program runs successfully but calculates an incorrect qualification result
- D
The editor cannot open the source file
A weather application needs to display a location, its current temperature, the weather condition, and the forecast time. Which representation best applies abstraction for this purpose?
- A
A complete model of every satellite, sensor, network connection, database operation, and interface event
- B
A representation containing the location, current temperature, weather condition, and forecast time
- C
A list of every building, tree, and street near the user’s location
- D
The electrical signals used by the computer to receive weather data
A team is designing a library checkout system. Which plan most effectively applies decomposition?
- A
Write one large procedure that handles every library action from start to finish
- B
Create a separate module for every individual character displayed on the screen
- C
Separate the system into identifying books, checking availability, recording checkout information, calculating due dates, and updating availability
- D
Ask several programmers to implement the entire system independently without assigning responsibilities
A programmer notices that calculating a product total, a test-score total, and a road-distance total all involve starting at zero and adding each value in a collection. What is the most appropriate use of pattern recognition?
- A
Use one reusable accumulation procedure for each collection of values
- B
Design three completely unrelated procedures because the contexts use different words
- C
Sort every collection before adding its values
- D
Replace the repeated addition with a random selection of one value
True or false: Programming and problem solving are identical because every problem-solving activity must involve writing code.
- A
True
- B
False
A program must find a value in a very large list. Which statement best explains why binary search may be more efficient than a one-by-one search?
- A
A one-by-one search is always faster because it uses fewer comparisons in every situation
- B
Binary search works only when the list is unsorted, whereas one-by-one search requires sorted data
- C
The two methods must have the same efficiency because both can find an item
- D
Binary search can repeatedly discard half of a sorted list, while a one-by-one search generally examines items sequentially
In the algorithm that finds the largest number, the stored value remains the greatest value examined so far after each iteration. What is this maintained condition called?
A temperature-conversion program uses the rule F=C×59+32. What Fahrenheit value should it produce when the input is 20 degrees Celsius?
True or false: An algorithm can be considered satisfactory even if it works for only one specific valid input, as long as it produces the correct result for that input.
- A
True
- B
False
True or false: Binary search can safely be used to find an item in a list only when the list has been arranged in an appropriate sorted order.
- A
True
- B
False
Which algorithm property is required when a procedure must eventually stop after a finite number of steps? Enter the property name.