Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE HELP ME WRITE THE PROGRAMME IN PYTHON. THANKS. link to data files: ttps://drive.google.com/open?id=1cpfaHVHATsQZKgp3lIt7Y9VCEBTP1t0h CSC 110 No Comments Lab Activity--Working with Files Objectives: practice reading

image text in transcribed

PLEASE HELP ME WRITE THE PROGRAMME IN PYTHON. THANKS.

link to data files: ttps://drive.google.com/open?id=1cpfaHVHATsQZKgp3lIt7Y9VCEBTP1t0h

CSC 110 No Comments Lab Activity--Working with Files Objectives: practice reading data from a file practice writing data to a file work with a counter and an accumulator Write a program that asks the user for the name of a file (all files you test must have one number per line with no blank lines; two examples are provided below) . reads in those numbers one at a time writes the even numbers to a file named even.txt writes the odd numbers to a file named odd.txt displays (in the shell window) the sum of the even numbers and the count of the negative numbers Here are 2 fles you can use to test your program (remember, RIGHT-click, Save Target/Link As. data.txt otherData.txt The program should work with a text file of any length as long as it contains one number per line. The file should have no empty (blank) lines, including at the very end of the file. Ask for help if you have questions; upload your code by posted deadline. A solution will be posted after uploading is no longer possible 2096. 16 874,18

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

SQL Server T-SQL Recipes

Authors: David Dye, Jason Brimhall

4th Edition

1484200616, 9781484200612

More Books

Students also viewed these Databases questions