Answer:
The code for the given statements are described below.
Explanation:
// Place code below in line 9
if(numItems < 0) // starting of a loop
{
numItemsPointer = NULL;
}
else
{
numItemsPointer = &numItems;
numItems = numItems * 10; // items multiplied by 10
} // ending of a loop
Ryan should apply a filter/criteria on the Courses column and view all the courses that show Sociology
Answer:
Option a: a sorted array
Explanation:
Since the expectation on the data structure never need to add or delete items, a sorted array is the most desirable option. An array is known for its difficulty to modify the size (either by adding item or removing item). However, this disadvantage would no longer be a concern for this task. This is also the reason, linked list, binary search tree and queue is not a better option here although they offer much greater efficiency to add and remove item from collection.
On another hand, any existing items from the sorted array can be easily retrieved using address indexing and therefore the data query process can be very fast and efficient.
Explanation:
Exterior gateway protocol are the routing protocols that are used on the internet for exchanging routing information among the autonomous system. These autonomous systems can be gateway protocol, vector routing protocol.
Answer:
Here is the Python program which has a function sum_scores:
def sum_scores(score1, score2, score3, score4):
sum = score1 + score2 + score3 + score4
print(sum)
sum_scores(14,7,3,0)
Explanation:
- Method sum_scores takes four arguments, score1, score2, score3, score4.
- The sum variable adds these four scores and stores the value of their addition.
- Lastly print statement is used to print the value stored in sum variable which is the value obtained by adding the four scores.
- Last statement calls the sum_scores method and passes four values to it which are 14,7,3,0
- The output of the above program is:
- 24
- If you want to use return statement instead of print statement you can replace print(sum) with return sum. But in order to display the sum of the scores you can replace sum_scores(14,7,3,0) with print(sum_scores(14,7,3,0))
- The program along with the output is attached as a screenshot.