A teacher asks students to design an app for tracking homework. Which step best demonstrates decomposition?
Computational Thinking And Data Analysis
Question · Easy
Contrapositive, darling: a torch song
Short
Which pseudocode structure repeats a block of instructions until a condition is no longer true?
A map app shows roads and travel time but hides most details about individual pavement markings. This is an example of which computational thinking idea?
Given the pseudocode x = 3; y = 2; x = x + y; print(x), what is printed?
In a flowchart, which symbol is most commonly used to represent a yes/no decision?
Which search method requires the list being searched to already be sorted?
Bubble sort primarily works by repeatedly doing which action?
A data set has blank entries where students skipped an optional survey question. What should students usually do before drawing conclusions from that field?
A spreadsheet filter is best used to do which task?
Why might a simulation include random numbers?
Given total = 0; for each n in [4, 1, 5] do total = total + n; print(total), what is printed?
Question · Medium
A recursive function that computes the factorial of a nonnegative integer should include which base case?
An algorithm examines each item in a list of n items exactly once. Which basic time complexity best describes it?
A student claims an algorithm correctly finds the smallest number in a list because after each pass, the variable smallest contains the smallest value seen so far. What is the student describing?
A class wants to find a student name in a roster that is already alphabetized. Which approach is most efficient for a large roster?
Selection sort is sorting [6, 2, 5, 1] in ascending order. After the first pass that places the smallest value first, what should the list be?
Two sorted lists contain a total of n items. A merge procedure repeatedly takes the smaller front item from either list until both lists are empty. What is the time complexity of the merge?
Students build a model to predict bike-share demand from weather data. Which practice best helps evaluate whether the model generalizes beyond the examples used to build it?
A CSV file has columns named city, date, high_temperature, and rainfall_inches. What does each row most likely represent?
Students want to examine whether hours of sleep and quiz score tend to increase together. Which visualization is usually most appropriate?
A data set of home prices contains one extremely high mansion price compared with all other homes. Which statistic is least affected by that outlier?
A list has valid indexes 0 through 9. Which loop header visits every valid index exactly once?
A school analyzes login records to find accounts with unusually many failed attempts in a short time. This is an example of using data analysis to identify:
An algorithm has an outer loop that runs n times and an inner loop that also runs n times for each outer iteration. The inner body does constant work. What is the overall time complexity?
Question · Hard
A naive recursive Fibonacci function computes fib(n) by calling fib(n - 1) and fib(n - 2) without storing previous results. Why is memoization helpful?
A stable sorting algorithm is used to sort student records by period number. What does stability guarantee when two students have the same period number?
Students simulate cafeteria wait times using only data collected on a special assembly day when schedules were shortened. What is the main threat to their conclusion?
A while loop repeatedly replaces a positive integer n with floor(n / 2) and stops when n equals 0. Which argument best supports termination?
Which description best matches a compiled programming language implementation?
Programming Concepts
What is the purpose of a variable in a program?
If a = true and b = false, what is the value of a AND b?
In a zero-indexed string s = 'code', which character is at index 2?
An array scores contains [90, 82, 77]. What does scores[1] refer to in a zero-indexed language?
What is 17 mod 5?
Which structure is most appropriate when a program must execute one block if a condition is true and a different block otherwise?
A while loop should usually include what kind of statement to avoid running forever?
In function area(width, height), width and height are best described as:
In object-oriented programming, an object is best described as:
Which code comment is most useful?
A program should print the first 10 positive integers but prints 1 through 9. What kind of bug is most likely?
A weather app uses a service that provides current temperature data through documented request and response formats. What is the app most likely using?
A button-click handler in an app runs only after the user clicks the button. This programming style is best described as:
In a language where integer division discards the remainder, what is the result of 14 / 4?
Which expression is logically equivalent to NOT (A OR B)?
What is printed by the pseudocode: count = 0; for i from 1 to 3; for j from 1 to 2; count = count + 1; print(count)?
A program evaluates '7' + '3' as '73' instead of 10. What is the most likely reason?
A and B refer to the same mutable list. After executing A.append(4), what should be expected of B in languages with reference semantics for lists?
Loading more…