Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Review
So you think you can count?
Rounding functions and more
Review and practice
25. Exercise 3

Instruction

Nice! What about this next exercise?

Exercise

Each warrior at Level 3 or higher can perform a special attack whose damage is calculated as follows:

Character's strength added to one-fourth of its hp, and then multiplied by the absolute value of stat_modifier. Here's the equation to visualize this:

(strength + {hp \over 4.0}) * |stat\text{\textunderscore}modifier|

For characters who have this attack available, show the character's name and the amount of damage dealt by this attack (name the column: damage).

Stuck? Here's a hint!

You'll need the following expression:

(strength + hp / 4.0) * ABS(stat_modifier)