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
Solved! Go to Solution.
i'm a student at Illinois state and none of my professors know anything about python or how it works with arcgis. Thanks for the links i will be sure to start looking into them.
sadly... only a few of my students know about python or how it works with ArcGIS.
i wish we had a class that focused on using python to create models in arcgis. I think i may propose it to our department though so that other students don't get stuck like i did.
That would be great! Hope they will accept it
You might get a kick out of a couple of my blog posts
you-are-not-allowed-to-use-modelbuilder-when-instructors-need-to-get-smarter
you-are-not-allowed-to-use-geoprocessing-results-the-students-get-smarter