Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Dinosaurs
- ## Description
- The intention of this exercise is to see how the datasets are parsed and
- merged to get the desired output. We want to understand how the problem
- is thought and solved rather than how it's coded.
- Estimated time:
- ## Exercise
- You will be supplied with two data files in CSV format:
- * The first file contains statistics about various dinosaurs.
- * The second file contains additional data.
- Given the following formula,
- ```
- speed = ((stride_length / leg_length) - 1) * sqrt(leg_length * g)
- ```
- Where g = 9.8 m/s^2 (gravitational constant)
- 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.
- ```
- $ cat dataset1.csv
- NAME,LEG_LENGTH,DIET
- Hadrosaurus,1.4,herbivore
- Struthiomimus,0.72,omnivore
- Velociraptor,1.8,carnivore
- Triceratops,0.47,herbivore
- Euoplocephalus,2.6,herbivore
- Stegosaurus,1.50,herbivore
- Tyrannosaurus Rex,6.5,carnivore
- $ cat dataset2.csv
- NAME,STRIDE_LENGTH,STANCE
- Euoplocephalus,1.97,quadrupedal
- Stegosaurus,1.70,quadrupedal
- Tyrannosaurus Rex,4.76,bipedal
- Hadrosaurus,1.3,bipedal
- Deinonychus,1.11,bipedal
- Struthiomimus,1.24,bipedal
- Velociraptorr,2.62,bipedal
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement