Advertisement
lucast0rres

Lista 3 - 1.7

Apr 26th, 2016
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. tartaruga = 100
  2. aquiles = 0
  3.  
  4. velt = float(input("Digite a velocidade da tartaruga: "))
  5. vela = 10*velt
  6.  
  7. tempo = 0
  8.  
  9. while tartaruga >= aquiles:
  10.     tartaruga = tartaruga + velt
  11.     aquiles = aquiles + vela
  12.     tempo = tempo + 1
  13.  
  14. print "%.2f s" % tempo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement