Advertisement
Guest User

Untitled

a guest
Aug 15th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. # Dinosaurs
  2.  
  3. ## Description
  4.  
  5. The intention of this exercise is to see how the datasets are parsed and
  6. merged to get the desired output. We want to understand how the problem
  7. is thought and solved rather than how it's coded.
  8.  
  9. Estimated time:
  10.  
  11. ## Exercise
  12.  
  13. You will be supplied with two data files in CSV format:
  14. * The first file contains statistics about various dinosaurs.
  15. * The second file contains additional data.
  16.  
  17. Given the following formula,
  18.  
  19. ```
  20. speed = ((stride_length / leg_length) - 1) * sqrt(leg_length * g)
  21. ```
  22.  
  23. Where g = 9.8 m/s^2 (gravitational constant)
  24.  
  25. Write a program to read in the data files from disk, it must then print the names of only the bipedal dinosaurs from fastest to slowest. Do not print any other information.
  26.  
  27. ```
  28. $ cat dataset1.csv
  29. NAME,LEG_LENGTH,DIET
  30. Hadrosaurus,1.4,herbivore
  31. Struthiomimus,0.72,omnivore
  32. Velociraptor,1.8,carnivore
  33. Triceratops,0.47,herbivore
  34. Euoplocephalus,2.6,herbivore
  35. Stegosaurus,1.50,herbivore
  36. Tyrannosaurus Rex,6.5,carnivore
  37.  
  38. $ cat dataset2.csv
  39. NAME,STRIDE_LENGTH,STANCE
  40. Euoplocephalus,1.97,quadrupedal
  41. Stegosaurus,1.70,quadrupedal
  42. Tyrannosaurus Rex,4.76,bipedal
  43. Hadrosaurus,1.3,bipedal
  44. Deinonychus,1.11,bipedal
  45. Struthiomimus,1.24,bipedal
  46. Velociraptorr,2.62,bipedal
  47. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement