Creating an array of names

Assignment Help C/C++ Programming
Reference no: EM13811879

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).

Reference no: EM13811879

Questions Cloud

Analyza the risk assessment in construction management : Analyza the Risk Assessment in Construction Management. Visit a construction site and identify all actual and inherent risks seen. Provide the location and time of visit.
Major components of a human resources plan : Part of project implementation or execution is having a human resources plan. What are the major components of a human resources plan?
Constitutional order and government stability : Constitutional Order and Government Stability
Important skill and process in project management : What value does using graphics add to the project management process? Why is estimation an important skill and process in project management?
Creating an array of names : Just write the codes and label my variables. Example: (with Python not C++). Creating an array of names
Quality culture and a traditional culture : There are various differences between a quality culture and a traditional culture. While formulating strategies and implementing quality culture, you need to understand these differences and plan accordingly.
Coefficient of kinetic friction between the tires of the car : What will be the net velocity of the ship if the captain points his ship on a bearing of 55° North or West and applies full power?
Commercialization of organ transplants : Commercialization of Organ Transplants
Explain the five-component model : List and briefly explain the five-component model of an information system. How can you use them?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd