Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON Write a program that opens file numbers.txt which contains a series of names followed by integers. The program read the data from the file

PYTHON Write a program that opens file numbers.txt which contains a series of names followed by integers. The program read the data from the file and prints the count of odd numbers, the count of negative numbers, the sum of negative numbers, and the average of positive numbers. For example, if the input file contains the following text:

Dan 3

Cordelia 7

Tanner 14

Mellany 13

Curtis -4

Amy 12

Nick 6

Tina 4

Jack -13

Sarah 12

Robert -2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Rules In Database Systems Third International Workshop Rids 97 Sk Vde Sweden June 26 28 1997 Proceedings Lncs 1312

Authors: Andreas Geppert ,Mikael Berndtsson

1997th Edition

3540635165, 978-3540635161

More Books

Students also viewed these Databases questions

Question

Prepare a constructive performance appraisal.

Answered: 1 week ago

Question

List the advantages of correct report formatting.

Answered: 1 week ago