Question: code the following in python: below is the .txt file 1. P2.6.3 Your program should output the ESI of each body (to 4 places after

code the following in python:

code the following in python: below is the .txt file 1. "P2.6.3

Your program should output the ESI of each body (to 4 places

below is the .txt file

after the decimal) in a clean string. As a check for your

1. "P2.6.3 Your program should output the ESI of each body (to 4 places after the decimal) in a clean string. As a check for your work, note that the ESI of Mars is about 0.7. Note also that the .txt file used in this problem has a problematic format: columns are separated by spaces, but the entries in the first column also contains spaces! To get around this, note that once you have a line assigned to object 's,you can do something like: s -s.Istrip() # remove leading whitespace index s, find(, ,) # find the location of the first 'two spaces. obj -s[index] # call out the object name s s[index+2:] # then truncate the string to everything else

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!