about | help | code help+videos | done | prefs |
Write a method that returns how spooky a haunted house is. The spookiness is determined by how many ghosts, vampires, and skeletons are present. However, some of these are more scary than others. Ghosts have a scariness factor of 7, while vampires have a factor of 9 and skeletons have a factor of 4. So if a haunted house has one of each, its scariness factor would be 20. If they only have two ghosts and nothing else, the scariness factor would be 14. Look at the test data for other examples. oct31_2019_APP1SLHL_spooky(7, 1, 2) → 66 oct31_2019_APP1SLHL_spooky(8, 22, 5) → 274 oct31_2019_APP1SLHL_spooky(1, 1, 1) → 20 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 280
Copyright Nick Parlante 2017 - privacy