Answer:
see explaination
Explanation:
def words2number(s):
words = s.split()
numbers = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']
result = ""
for word in words:
if word in numbers:
result += str(numbers.index(word))
return result
An academic skill that the blogger learned, was to review the graded tests and quizzes to see which concepts he missed out on so that in the future he would be well prepared for it. Reviewing and comparing the tests and quizzes would give him an idea on which topics he needs to study.
Other than the academic skill, the blogger also learned that a person should never give up and he keeps on learning throughout his entire life, and that all of the improvements that the blogger made did not come all at once.
Answer:
<u>Functions</u>
The piece of code that is used to perform the same operation at multiple places with different parameters.
<u>Loops</u>
The piece of code that is used to perform a task multiple times and continue until the loop ends.
<u>Explanation</u>
Both of these have different kind of circumstances to apply. For example.
- Function can perform a specific operation whenever we call. but when we use loop it will perform same task at multiple times at same place.
- Functions can be called at different places to perform operations multiple times but once loop called it cannot complete the operations until loop completed.
- Each time when we call the function we can change the values but in loop in iteration we cannot change the value of any variable until loop ends.
B. Bend and Break Is the correct answer
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.