Just write the codes and label my variables example with


Just write the codes and label my variables.

Example: (with Python not C++)

# This program will Combine lists together

# Creating an array of names

Names = ['Turner', 'Philips', 'Stevenson', 'Jones', 'Gonzalez', 'Whitaker', 'Bruner', 'Webster', 'Foster', 'Anderson', 'Klein', 'Connors', 'Rivers', 'Wilson', 'Duncan']

# Creating an array with integer type

Grades = [94, 82, 87, 78, 65, 90, 85, 97, 70, 100, 57, 88, 73, 92, 84]

# Function that computes average for the given list of items

def average(g_list):

# Returns the length of the list

sum = 0

n = len(g_list)

for i in range(n):

# Adding each element

sum = sum + g_list[i]

# Calculating the average

return sum/float(n)

# Calculates the average

avg = average(Grades)

# Prints the average

print (avg)

# Function to calculate the median of the given list

def median(g_list):

#lst = g_list

#even = (0 if len(lst) % 2 else 1) + 1

#half = (len(lst) - 1) / 2

#return sum(sorted(lst)[half:half + even]) / float(even).

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Just write the codes and label my variables example with
Reference No:- TGS01092094

Expected delivery within 24 Hours