about | help | code help+videos | done | prefs |
Write a method that returns 'true' if you can go somewhere in your car, or 'false' if you cannot. To be able to go somewhere in your car you must have a car, and it must have gas and air in the tires. You must also have at least $20 just in case. Each of the input parameters represents one of these things in an obvious way. Look at the test data for examples. Remember, you must only have ONE return statement per method. practiceQuiz2021_08_30_SLHL_canGo(true, true, true, 16) → false practiceQuiz2021_08_30_SLHL_canGo(true, true, true, 22) → true practiceQuiz2021_08_30_SLHL_canGo(true, true, true, 20) → true ...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: 240
Copyright Nick Parlante 2017 - privacy