AnsweredAssumed Answered

help turning input into user input in arcgis

Question asked by bbrewe1 on Nov 10, 2017
Latest reply on Nov 10, 2017 by Dan_Patterson

velocity = float(input("Input asteroid velocity: "))
mass = float(input("Input asteroid mass: "))
ice = float(1.8)
iron = float(7.3)
rock = float(2.3)
comp = input("input 1 for ice, 2 for iron, or 3 for rock: ")
grav = float(0.16667)
const = float(0.007)
colrt = float(1.3)
soil = float(2.65)
power = (int(1)/float(3.4))
vel = (velocity * 1000)
kilotons = (4184000000000)
if comp == 1:
comp = ice
elif comp == 2:
comp = iron
elif comp == 3:
comp = rock
kinetic = (0.5 * mass * (vel * vel))
energy = (kinetic * kilotons)
part1 = (const * colrt * grav)
part2 = (comp / soil)
part3 = (energy * part2)
part4 = (part3 ** power)
crater = (part1 * part4)
final = (crater / int(1000))
print(final)

 

sorry for the length but i'm trying to take the velocity, mass, and comp and turn them into user input parameters that will be run through the equation and then have it spit out a diameter

 

my problem is trying to set up the user input part to work with my script. i eventually want to take the script add it to model builder and do more with the output of this script. 

any help would be greatly accepted

Outcomes