Question: import math #read initiali values of x0 , y0 and alpha and beta x0 = float(input(Enter x0: )) alpha = float(input(Enter alpha: )) y0 =

 import math #read initiali values of x0 , y0 and alpha and beta x0 = float(input("Enter x0: ")) alpha = float(input("Enter alpha: ")) y0 = float(input("Enter y0: ")) beta = float(input("Enter beta: ")) #set x to x0 , y to y0 and time to 0 and delta of time to 0.5 x = x0 y = y0 t = 0 delta_t = 0.5 for i in range(0,5): #calculate x and y at time t x = x0*math.exp((-((alpha*beta)**0.5))*t) y = y0*math.exp((-((alpha*beta)**0.5))*t) #print x and y at time t print("x = %f" %x) print("y = %f" %y) #TODO print time print("t = ",t) #increment time t = t+delta_t

The code above is a chegg question answered.

The customer and yourself are satisfied with the initial battle simulator (which is the python code above) as a basis for further elaboration. They want to evaluate troop reinforcement policies that add more troops during a battle. Include the capability to add new troops modeled as instantaneous pulses of reinforcements. Each reinforcement may also have a different lethality coefficient ascribed to the new troops. Model the combined effect of lethality portions on the sides. Each side will be limited to a maximum of 3 reinforcements of specified levels. Elicit the inputs from the user and/or read them from a file. The replacement policies shall be specified as: - # of reinforcement events (0-3) - % of initial force level at which a reinforcement occurs (10% - 80%) - reinforcement force size as % of initial force level (10% - 50%) - lethality coefficient of the new troops. Troop reinforcements only occur when the reduction condition is met, thus less may occur than the maximum potential number provided. You may make other improvements to your initial program. Submit your source code file(s), evidence of successful execution, and other files used (if any). Provide any special instructions necessary to run your program.

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!