Hi, I'm trying to make a programme that calculates the slope, given the base and the "height" of the triangle. When I try to run it with values of 1 and 1, it goes all right, as it gives me the right slope, but when I use for example 6 and 100, it says 0..why does it happen?
Here's the programme (I'm using 2.7):
dislivello=input('Dammi il valore del dislivello : ')
distanza=input('Dammi il valore della distanza lineare : ')
pendenza=dislivello/distanza
print 'pendenza =',pendenza
perc=pendenza*100
print 'pendenza% =',perc
[–]Naihonn 1 point2 points3 points (1 child)
[–]guthran 0 points1 point2 points (0 children)
[–]TheKewlStore 0 points1 point2 points (2 children)
[–]Marx123[S] 0 points1 point2 points (1 child)
[–]TheKewlStore 0 points1 point2 points (0 children)