A file named datatxt contains an unknown number of lines


A file named data.txt contains an unknown number of lines, each consisting of a single integer. Write some code that creates two files, dataplus.txt and dataminus.txt, and copies all the lines of data1.txt that have positive integers to dataplus.txt, and all the lines of data1.txt that have negative integers to dataminus.txt. Zeros are not copied anywhere.

Use the file object output to write the string "3.14159" to a file called pi.

Assume that a file containing a series of integers is named numbers.txt. Write a program that calculates the average of all the numbers stored in the file. 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: A file named datatxt contains an unknown number of lines
Reference No:- TGS01164007

Expected delivery within 24 Hours