Hero Card (Structs & Classes)

Define a Hero type with name, hp and attack. Read them and print name (HP hp, ATK attack).

Input: name hp attack.

Output: e.g. Pip (HP 30, ATK 7).

Difficulty: Easy. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.

Hint

  • Create the struct or class first, then print from its fields.

More Structs & Classes practice