Question: I have this program already, and I need to configure it to round all outputs to 3 decimal places and be able to take command
I have this program already, and I need to configure it to round all outputs to decimal places and be able to take command line inputs. Im not sure where to go from here.
import numpy as np
def logisticx r:
return r x x
def simulatex r nsteps, outputfile:
population npzerosnsteps
population x
for i in range nsteps :
populationi logisticpopulationi r
roundpopulationi
with openoutputfile, w as f:
for i in rangensteps :
fwritefitpopulationi
if namemain:
x
r
nsteps
outputfile "population.txt
simulatex r nsteps, outputfile
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
