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
Explanation:
HTML displays data and describe the structure of a webpage while XML stores and transfers data.
Usually a graphics card would be plugged in manually through a PCI-e express slot on the motherboard. But to give the card enough power (based on how powerful the card is) you would use a 6 pin or an 8 pin power connector.
<span />
Answer:
<u>First test:</u> Give a list of disordered numbers to the sorting algorithm an examine if the output is correctly sorted.
<u>Second test:</u> Give a list of ordered numbers to the sorting algorithm an analyze if the output is still correctly ordered.
<u>Third test:</u> Give a list of ordered numbers and some non-numeric values to the sorting algorithm and check how is managed the exception in case of error or if the output is correctly ordered.