Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python 3.x help: I have basic text files that I need to read from that look exactly like this: What I want to do is

Python 3.x help:

I have basic text files that I need to read from that look exactly like this:

image text in transcribed

What I want to do is take this data and do this:

image text in transcribed

It is important to note that I can only grow five different fruits: firefruits, waterfruits, grassfruits, joltfruits and megafruit o when it goes F for firefruit, W for waterfruit tree etc. I need to take that data and then put it into an array, that sort of looks like this:

image text in transcribed

so the first line of data in the file is a number that tells you the dimensions of the array, the second line from the file gives you the position of the Firefruit, third line will be Waterfruits, the forth line grass fruits, fifth line joltfruits, and the sixth line if it has any megafruits.

Xpokefruit palletfarm-Notepa fruit saffrcnfarm - Notepad pokefruit.celadonfarm-Notepad Fildil a Vies Help ldi Formal View Help File Edit Fermat View Help 0,2 2,0 4,2 2,4 0,e 0,3 3,a 3,3 30,16 32,49 34,18 34,32 36,37 33,33 33,37 17,18 42,76 19,21 23,21

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

Objects And Databases International Symposium Sophia Antipolis France June 13 2000 Revised Papers Lncs 1944

Authors: Klaus R. Dittrich ,Giovanna Guerrini ,Isabella Merlo ,Marta Oliva ,M. Elena Rodriguez

2001st Edition

3540416641, 978-3540416647

More Books

Students also viewed these Databases questions