about | help | code help+videos | done | prefs |
Write a method that determines how many hours of fun you are planning on having over Spring Break. Your method accepts two arrays, an array of strings with verbal descriptions of the different activities you will do, and an array of integers specifying how many hours you will spend on the corresponding activity. All "fun" activities will have strings that start with "fun:" (all lower case). Any "fun" actitiy should could towards your total hours of fun. Any other activty will NOT count towards your total. The two arrays will be of the same length. SpringBreakHoursOfFun(["what: fun", "lotso: fun", "fun: fun"], [3, 6, 11]) → 11 SpringBreakHoursOfFun(["fun:", "fun:", "fun:", "fun:", "fun:", "Fun:", "FUN:"], [1, 2, 3, 4, 5, 6, 7]) → 15 SpringBreakHoursOfFun(["fun:"], [1512]) → 1512 ...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