### Programming Assignment ### # Complete the calc_average () and determine_grade () functions # Compare with...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
### Programming Assignment ### # Complete the calc_average () and determine_grade () functions # Compare with the expected result given in the assignment description # IMPORTANT: Before you submit, make sure your program produces the expected result # as shown in the assignment description # Do NOT change the function header calc_average() def calc_average(): gradestoavg [] total = 0 for i in range (8): gradestoavg.append(int (input("Please enter score #{}:".format(i + 1)))) total + gradestoavg[i] avg = return int (avg) def determine_grade (score): if score >= 90 and score ### Programming Assignment ### # Complete the calc_average () and determine_grade () functions # Compare with the expected result given in the assignment description # IMPORTANT: Before you submit, make sure your program produces the expected result # as shown in the assignment description # Do NOT change the function header calc_average() def calc_average(): gradestoavg [] total = 0 for i in range (8): gradestoavg.append(int (input("Please enter score #{}:".format(i + 1)))) total + gradestoavg[i] avg = return int (avg) def determine_grade (score): if score >= 90 and score
Expert Answer:
Answer rating: 100% (QA)
Here is the corrected version of the provided code python def calcaverage gradestoavg tot... View the full answer
Related Book For
Microeconomics An Intuitive Approach with Calculus
ISBN: 978-0538453257
1st edition
Authors: Thomas Nechyba
Posted Date:
Students also viewed these programming questions
-
Henry Mueller Supply Co. sells tamperproof, normally open thermostats (i.e., thermostat closes as temperature rises). Annual cash flows are shown in the table below. Determine the future worth of the...
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
Determine whether each of these statements is true or false. a) x {x} b) {x} {x} c) {x} {x} d) {x} {{x}} e) {x} f) {x}
-
The owners of Les Tigres de Trois-Rivieres hockey club are considering a deal with an older, established club whereby they can acquire the services of Pierre Luc, a very high scorer and great gate...
-
1 ezt 9. Show that 2 z 2 +1 dz = sint if t> 0 and C is the circle |2| = 3. eiz 10. Evaluate f dz where C is the circle || = 2. (5) (5)
-
What are the primary components of an insurance policy?
-
Consider a hot automotive engine, which can be approximated as a 0.5-m-high, 0.40-m-wide, and 0.8-m-long rectangular block. The bottom surface of the block is at a temperature of 80C and has an...
-
Respond to the following based on your reading. 11. What are cash equivalents, and why are they included with cash on a statement of cash flows? 12. What general guidelines can you provide for...
-
During 2019, Jason and Vicki Hurting, who are married with two children and filing jointly, had the following tax information. Jason owns a cash-basis landscaping business, and Vicki works as a sales...
-
An annuity pays $145.00 each period for 10 periods. For these cash flows, the appropriate discount rate/period is 4.5%. What is the future value of this annuity in period. kindly use formula do use...
-
The following program has careless errors on several lines. Find and correct the errors and show the output where requested. #include int main () { } int* ptr: int* temp; int x; ptr = new int; *ptr =...
-
If the base address of student is 100, what address does the compiler generate as the target of the following assignment statement? typedef char String[10]; struct Student Record { String firstName;...
-
1. Is there a path from Oregon to any other state in the graph? 2. Is there a path from Hawaii to every other state in the graph? 3. From which states in the graph is there a path to Hawaii? Vermont...
-
Functional decomposition is based on a hierarchy of ____________________, and object-oriented design is based on a hierarchy of ____________________.
-
The order of an algorithm that increments every element in a twodimensional table of N rows. 1. O(1) 2. O(logN) 3. O(N) 4. O(N logN) 5. O(N*N) 6. O(N*N*N)
-
A diffraction pattern of a cubic crystal of lattice parameter a = 3.16 is obtained with a monochromatic x-ray beam of wavelength 1.54 . The first four lines on this pattern were observed to have the...
-
An Atomic Energy Commission nuclear facility was established in Hanford, Washington, in 1943. Over the years, a significant amount of strontium 90 and cesium 137 leaked into the Columbia River. In a...
-
Regulating Market Power in the Commons: In exercises 21.9 and 21.10, we investigated the case of many firms emitting pollution into a lake. We assumed the only impact of this pollution was to raise...
-
Since the early 1970s, the U.S. government has had a program called the Earned Income Tax Credit (previously mentioned in end-of-chapter exercises in Chapter 3.) A simplified version of this program...
-
In exercise 22.2, we showed how an efficient equilibrium with a complete set of insurance markets can be re-established with truthful signaling of information by consumers. We now illustrate that...
-
For the DTS study, use subjects with all five assessments in HamD scores in the CAU group for this question. The intraclass correlation coefficient among the repeated measures in Ham-D scores can be...
-
Generalize the model considered in Example 4.11 to a marginal model for the longitudinal DOS data and compare the findings with that in Example4.11 Example 4.11 For the models in Example 4.8 DOS,...
-
Prove (9.31) . = BE (GS;S; G) BT, B = (B), B-T (9.31)
Study smarter with the SolutionInn App