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

  Hypothetical method lock over an object lock

Imagine a hypothetical version of Java where the object lock is replaced by a method lock. Under this system a call to a synchronised method would assign a lock for that method to the calling thread.

  Write a program that will read in number of 2 point basket

Write a program that will read in the number of 2 point baskets and the number of 3 point baskets a player makes.  Print the number of each baskets and the total number of points scored.

  The insertion point located at the end of the numbered list

With the insertion point located at the end of the numbered list, insert a Basic Chevron Process SmartArt-under Process, in the fifth row, the second layout. In the first shape, type View. In the second shape type Interact and in the third shape type..

  Write a complete c program to do the following1 the main

write a complete c program to do the following1. the main program will read in a parameter value n read this in main.

  Write mergesort code for data instead of as array

Write mergesort code for data instead of as array - which takes a linked list of integers, as in the bubblesort example code. The decclaration of the struct listnode is the same as in the bubblesort on lists example.

  Card poker game develop a simple poker game complete with

card poker game develop a simple poker game complete with basic ai using the object oriented programming principles

  Write c program that will input two values from the user

write c program that will input two values from the user with a prompt ? that are a value and a base with which you

  Create a program that displays the number of days

Create a program that displays the number of days in a month. Use a 12-element one-dimensional array to store the number of days in each month

  Write a switch-case programming for calculation

How to use C++ to write a switch-case programming for calculation? Test the program for a wide range of possible inputs including division by zero and square root of negative values.

  Write program in c++ for cosx and sinx expansion

Write program in c++ for cosx and sinx expansion( for personal inputs are x,number of terms

  Design a simple atm service kiosk

Design a simple ATM service kiosk. This kiosk supports the following options for its menu: 1. Viewing your account balance2. Depositing cash3. Withdrawing cash

  Identify the primary and secondary variables

Identify the primary and secondary variables and construct the weak form of the nonlinear equation

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