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

 

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

Parkour is a dangerous sport that involves jumping, flipping, climbing, running, and other demanding physical activities. Many parkour enthusiast injure themselves. Write a method that returns the total injury index which is based on the following: Each ankle injury adds 1 to the index. Leg injuries add 3 to the index. Arm injuries add 8, and head injuries add 20. If the total injury index exceeds 100, then the index is doubled due to major injuries.


parkourInjury(0, 0, 1, 1) → 28
parkourInjury(22, 0, 0, 0) → 22
parkourInjury(2, 3, 8, 10) → 550

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

public int parkourInjury(int ankle, int leg, int arm, int head) { }

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: 220

Copyright Nick Parlante 2017 - privacy