Answer:
def average_strings(lst):
total_length = 0
avg = 0
for s in lst:
total_length += len(s)
avg = total_length/len(lst)
return avg
Explanation:
Create a function called average_strings that takes one parameter, lst
Initialize the total length and avg variables
Create a for loop that iterates through the lst. Get each string's length and put it to the total length
When the loop is done, calculate the average, divide total length by length of the lst
Return the average
Answer:
Following are the answer for the given question
for(int i=1;i<=99;++i) // for loop
{
cout<<"EXAM"<<endl; // display the word EXAM
}
Explanation:
In this question we using for loop which is iterating 99 times and print the
word "EXAM " 99 times.
The variable i is initialized by 1 and check the condition if the condition in loop is true it will execute the loop and print "EXAM" .The loop will executed 99 times when the condition in loop is false then loop become terminated.
Following are the program in c++
#include<iostream>// header file
using namespace std;
int main() // main method
{
for(int i=1;i<=99;++i) // for loop
{
cout<<"EXAM"<<endl; // display the word EXAM
}
return 0;
}
Answer:

Explanation:
Given

Required
The product using distributive property
Express 16 as 10 + 6

Distributive property states that:

So, the expression becomes

Evaluate each product

