A. hub
I can't think of a good reason to use a hub anymore, I always use a switch instead.
Answer:
they are dealing with people, not computers.
def zipZapZop():
number = int(input("Enter the number: "))
dictionary = {3: "zip", 5: "zap", 7: "zop"}
amount = 0<em> #amount of non-divisible numbers by 3, 5 and 7</em>
<em> for key, value in dictionary.items():</em>
if(number%key == 0): <em>#key is the number</em>
print(value) <em>#value can be or zip, or zap, or zop</em>
else: amount += 1 #the number of "amount" increases every time, when the number is not divisible by 3, or 5, or 7
if(amount == 3): print(number) <em>#if the number is not by any of them, then we should print the number</em>
zipZapZop()
<span>Assuming that the language is C++ and that the following variables exist:
bonusscores is an array of some numeric type (float, double, int, etc).
nent is an integer indicating how many elements are in bonusscores.
Also assuming that the array is 0 based, so legal subscripts range from 0 to nent-1.
// Code starts here
for(int x = 0; x < (nent-1); ++x) {
bonusscores[x] = bonusscores[x] + bonusscores[x+1];
}
// Code ends here
Thing to note, since the last element isn't modified, the range for the for loop is reduced by 1 so that every element to actually be modified is visited, but the last element isn't. And since each element after modification isn't needed for future modifications, it's safe to change them in situ.</span>
Answer:
I think it would be A, good luck!