Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python 2.7: write a code to print a nicely formatted table that includes the index of each particle, its mass, and its x,y,x positions. Use

Python 2.7: write a code to print a nicely formatted table that includes the index of each particle, its mass, and its x,y,x positions. Use a for loop to step through your masses and positions lists to make this table. The output should look like the image below

image text in transcribed

I have pasted the lists and variables here: masses = [1.0e24, 40.0e24, 50.0e24, 30.0e24, 2.0e24] positions = [np.array([7.5e10, 3.9e11, 7.5e09]), np.array([1.2e11, 1.4e12, 1.5e10]), np.array([-6.1e11, -3.6e11, 1.2e11]).....(keeps going till the 5th row)

particle I mass l (kg) I (m) I 0 1.0e+24 7.5e+10 3.9e+11 7.5e+09 1 4.0e+25 1.2e+11.4e+121.5e+10 2 5.0e+25 -6.1e+11 3.6e+111.2e+11 3 3.0e+251.6e+12 5.5e+11 0.0e+00 4 2.0e+24 3.0e+11 2.8e+11 -6.0e+10

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

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

The company has fair promotion/advancement policies.

Answered: 1 week ago