Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this one is for iris.txt: 5.1,3.5,1.4,0.2,Iris-setosa 4.9,3.0,1.4,0.2,Iris-setosa 7.0,3.2,4.7,1.4,Iris-versicolor 6.4,3.2,4.5,1.5,Iris-versicolor 6.3,3.3,6.0,2.5,Iris-virginica 5.8,2.7,5.1,1.9,Iris-virginica In Class Exercise Create a file called file_reader_writer.py and open it in the CentOS

image text in transcribed

this one is for iris.txt:

5.1,3.5,1.4,0.2,Iris-setosa 4.9,3.0,1.4,0.2,Iris-setosa 7.0,3.2,4.7,1.4,Iris-versicolor 6.4,3.2,4.5,1.5,Iris-versicolor 6.3,3.3,6.0,2.5,Iris-virginica 5.8,2.7,5.1,1.9,Iris-virginica

In Class Exercise Create a file called file_reader_writer.py and open it in the CentOS Text Editor program. This program should open iris.txt and read all lines into a single List called L. Each float should be multiplied by 2 and the resultant data should be output to a file called new_iris.txt in the same format that the data is written to iris.txt. Hint: the float data will be read in as Strings and will need to be converted to float before the data can be "processed" aka multiplied by 2. In Class Exercise Create a file called file_reader_writer.py and open it in the CentOS Text Editor program. This program should open iris.txt and read all lines into a single List called L. Each float should be multiplied by 2 and the resultant data should be output to a file called new_iris.txt in the same format that the data is written to iris.txt. Hint: the float data will be read in as Strings and will need to be converted to float before the data can be "processed" aka multiplied by 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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

=+2 Why are international employment standards important to IHRM?

Answered: 1 week ago