p3 p4
The code fragment below is intended to display "odd" if the positive number num is odd. A segment of code is shown in a grey box. At the top it reads IF, then open angle bracket MISSING CONDITION close angle bracket, which is encircled. Below this and indented is a white box that reads DISPLAY, then "odd", which is in a rectangle. Which of the following can be used to replace <MISSING CONDITION> so that the code fragment will work as intended?
(num MOD 2) = 1
Which of the following are true statements about digital certificates in Web browsers? Digital certificates are used to verify the ownership of encrypted keys used in secured communication. Digital certificates are used to verify that the connection to a Web site is fault tolerant.
A I only
Which of the following programs is most likely to benefit from the use of a heuristic?
A program that finds the shortest driving route between two locations on a map
Which of the following best describes a Distributed Denial of Service (DDoS) attack?
An attempt to deny users access to a Web site's resources by flooding the Web site with requests from multiple systems
Which of the following is LEAST likely to indicate a phishing attack?
An e-mail from your bank asks you to call the number on your card to verify a transaction
If the variables onTime and absent both have the value false, what is displayed as a result of running the code segment?
Better late than never.
Which of the following statements about security in the network is true? Computers A and D need to communicate with at least two additional computers in the network in order to communicate with each other. Computers B and C can communicate with each other without additional computers being aware of the communication.
II only
The code segment below uses the procedure IsFound (list, item), which returns true if item appears in list and returns false otherwise. The list resultList is initially empty. text... Which of the following best describes the contents of resultList after the code segment is executed?
Only elements that appear in both inputList1 and inputList2
An algorithm has been developed to compute the sum of all the elements in a list of integers. Which of the following programming structures must be added to the existing algorithm so that the new algorithm computes the sum of only the even integers in the list?
Selection
Historically, it has been observed that computer processing speeds tend to double every two years. Which of the following best describes how technology companies can use this observation for planning purposes?
Technology companies can set research and development goals based on anticipated processing speeds
A certain computer game is played between a human player and a computer-controlled player. Every time the computer-controlled player has a turn, the game runs slowly because the computer evaluates all potential moves and selects the best one. Which of the following best describes the possibility of improving the running speed of the game?
The game's running speed might be improved by using a process that finds approximate solutions every time the computer-controlled player has a turn.
Consider the following program, which is intended to display the number of times a number target appears in a list. A segment of code is shown. At the top is a white box that reads count left arrow 1. This is at the top left corner of a larger grey box, at the top of which it reads FOR EACH n IN list. Below this in the grey box and indented is another grey box with a white border that reads IF, then n equals target, which is encircled. Below this in the smaller grey box is a white box, in which it reads count left arrow count plus 1. Below the larger grey box at its lower left corner is a white box that reads DISPLAY, then count, which is in a rectangle. Which of the following best describes the behavior of the program?
The program correctly displays the number of times target appears in the list.
Which of the following statements is true?
There exist problems that no algorithm will ever be able to solve for all possible inputs.
Which of the following shows a possible result of calling the procedure?
This option is incorrect. Since the parameter p is a positive integer, the robot can only end up in one of four possible squares in the grid: in the starting position, in the position two squares above facing up, in the position two squares above and two squares to the right facing right, or in the position two squares to the right facing left. The position shown is not one of the possible ending positions.
A certain social media Web site allows users to post messages and to comment on other messages that have been posted. When a user posts a message, the message itself is considered data. In addition to the data, the site stores the following metadata. The time the message was posted The name of the user who posted the message The names of any users who comment on the message and the times the comments were made For which of the following goals would it be more useful to analyze the data instead of the metadata?
To determine the topics that many users are posting about
Item identification number Footwear type (sneakers, boots, sandals, etc.) Selling price (in dollars) Size Color Quantity available Using only the database, which of the following can be determined?
Which items listed in the database are not currently in the store
The algorithm below is used to simulate the results of flipping a coin 4 times. Consider the goal of determining whether the simulation resulted in an equal number of heads and tails. Step 1: Initialize the variables heads_counter and flip_counter to 0. Step 2: A variable coin_flip is randomly assigned a value of either 0 or 1. If coin_flip has the value 0, the coin flip result is heads, so heads_counter is incremented by 1. Step 3: Increment the value of flip_counter by 1. Step 4: Repeat steps 2 and 3 until flip_counter equals 4. Following execution of the algorithm, which of the following expressions indicates that the simulation resulted in an equal number of heads and tails?
head_counter = 2