id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > mar5_2020_APP1SLHL_troubleLevel
prev  |  next  |  chance

Write a method that determines your "trouble level" based on the types of creatures that are surrounding you. Spiders are a little scary so they add 2 to your trouble level. Snakes are more scary so they add 4. Gators are the scariest with their big jaws full of teeth and their swishy tails, so they add 7 to your trouble level. Of course if ALL of these creatures are surrounding you, your trouble level doubles! Look at the test data for examples.


mar5_2020_APP1SLHL_troubleLevel(true, true, true) → 26
mar5_2020_APP1SLHL_troubleLevel(false, true, false) → 4
mar5_2020_APP1SLHL_troubleLevel(true, false, false) → 2

...Save, Compile, Run (ctrl-enter)

public int mar5_2020_APP1SLHL_troubleLevel(boolean spiders, boolean snakes, boolean gators) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 290

Copyright Nick Parlante 2017 - privacy