program c

Need help with all my programing assignments.

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)

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.