Compute and print out the average grade for each line

Assignment Help Computer Engineering
Reference no: EM132182778

This week, you'll leverage your knowledge basic Python data types, lists, and functions to calculate student grade averages.

Write a function called toNumbers(<list>) that accepts a list of strings, each of which represents a number, and converts each to a number,

Write a function called sumlist(<list>) that accepts a list of numbers and returns the total of them,

Write a program that reads a file called grades.txt in the same directory, and uses the above functions to compute and print out the average grade for each line

Your program can expect the file to have grades formatted like this, although actual number of grades and lines may vary:

74,85,65,56 97,67,83,96

Output should look like this:

average = n.n average = n.n

Reference no: EM132182778

Questions Cloud

Define the term hyperpartisanship : Define the term hyperpartisanship, and discuss why it has become more prevalent in modern American politics.
Diversity of hispanic americans : Explain the problems created by the diversity of Hispanic Americans.
What has been your concern about sharing information : Discussion deals with security controls available for Operating systems and more specifically it deals with firewalls and DLPs.
What about the dispersion of power : Countries with limits on government have usually had feudal pasts, which suggests what about the dispersion of power?
Compute and print out the average grade for each line : Write a function called toNumbers() that accepts a list of strings, each of which represents a number, and converts each to a number.
Homeland security act of 2002 shaped the gwot : How has Congressional legislation such as the Patriot Act and the Homeland Security Act of 2002 shaped the GWOT?
What current issue in american politics : What current issue in American politics would you like to see political protests focus on, and what you think would be the most effective strategy for those
Determine the total dividends and the per-share dividends : Dividends on Preferred and Common Stock - Determine the total dividends and the per-share dividends declared on each class of stock for each of the six years
Process of amending the us constitution : Should the process of amending the U.S. Constitution follow a similarly easy process? Or should amending the U.S. Constitution be made more difficult.

Reviews

Write a Review

 

Computer Engineering Questions & Answers

  Create an array named x that has n elements

Determine the number of values input by the user and store this value in a variable named N. Create an array named X that has N elements.

  Write c++ program that stops read a line of text

determine what characters , if any, are not displayed by program you ceated for exercise (a)

  Define different career tracks within information technology

The range of information technology (IT) jobs is extensive, but all IT professionals focus on improving usability and the efficiency of technological systems and processes.

  Review problem of agile software development

Research the Internet to obtain information on one of the following: SDLC, SCM, or Agile software development. Review the critical considerations to prepare.

  Design a system with a processor that is clocked at 10ghz

Determine the maximum distance between the CPU and Cache memory if we want to access cache data within one processor cycle.

  What does it mean when we refer to a biometric as symmetric

What does it mean when we refer to a biometric as symmetric? What is the meaning of Determine the total number of scores that have been generated?

  Recognizing the asset and threat

Propose the reasonable values for items in the risk register for this asset and threat, and offer the justifications for your choices.

  Develop your introductory remarks to the teams

Develop your introductory remarks to the teams, including five main points of risk assessment and five main points of incident response.

  A program to write the graph information to the screen

The first line of the file contains two integers n and m, which indicates the number of vertices and the number of edges on the graph, respectively.

  What kind of attack on double des makes it useless

What is double DES? What kind of attack on double DES makes it useless? What is triple DES? What is triple DES with two keys?

  Create list function to create the list with the integers

The main program will demonstrate that the functions work. Input: An input file contains an unknown number of integers.

  World wide web affect accountability in important ways

the World Wide Web affect accountability in important ways. Do you think e-reporting makes government more responsive

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