I need help with the Edhesive code practice 9.5
Answers
Explanation:
In computer programming, glue code is executable code (often source code) that serves solely to "adapt" different parts of code that would otherwise be incompatible. Glue code does not contribute any functionality towards meeting program requirements. Instead, it often appears in code that lets existing libraries or programs interoperate, as in language bindings or foreign function interfaces such as the Java native interface, when mapping objects to a database using object-relational mapping, or when integrating two or more commercial off-the-shelf programs. Glue code may be written in the same language as the code it is gluing together, or in a separate glue language. Glue code is very efficient in rapid prototyping environments, where several components are quickly put together into a single language or framework.
Answer:
a = [[34,38,50,44,39],
[42,36,40,43,44],
[24,31,46,40,45],
[43,47,35,31,26],
[37,28,20,36,50]]
sum=0
for r in range(len(a)):
for c in range(len(a[r])):
sum = sum + a[r][c]
print("Sum of all values: " + str(sum) + "\n\n")
print("Average of all values: " + str(sum / (len(a) * len(a))))
Explanation:
I got 100%.