What are we supposed to find? Help us
Answer:
Multiply(m,n)
1. Initialize product=0.
2. for i=1 to n
3. product = product +m.
4. Output product.
Explanation:
Here we take the variable "product" to store the result m×n. And in this algorithm we find m×n by adding m, n times.
Answer:
Correct code for the above question which is written after the defined list to display the output.
for x,y in country_pop.items(): #for loop to prints the list items.
print(str(x)+" has "+str(y)+" people") #print function to print the value.
Output:
- The above code is in python language which display the output as the above question demands.
Explanation:
- The above question code is written in python language to display the result, but this code is not correct.
- The above code needs a 'for' loop, which will render the list item one by one.
- The above-list defined in the form of key-value pair, So there is a need for the ''item" function which is the part of the python dictionary to display the list items.
- There also needs to define the two variables in the for loop, one is for key and the other is for value.
Answer
You should maintain course and speed unless the give-way vessel fails to take action.
Explanation
In the water ways when two boats are approaching nearly and then they may come to collision the boat on the right is the one which is considered as the stand-on vessel and it should be given way by the other boat or vessel. On this situation it should maintain course and speed unless the give-way vessel fails to take action. If it fails to take action what you should do is, you should take action and move away from the vessel, do not go toward the vessel nor pass in front of it.