Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 663 Bytes

how_many_lightsabers_do_you_own.md

File metadata and controls

27 lines (20 loc) · 663 Bytes

Description

Inspired by the development team at Vooza, write the function that

  • accepts the name of a programmer, and
  • returns the number of lightsabers owned by that person.

The only person who owns lightsabers is Zach, by the way. He owns 18, which is an awesome number of lightsabers. Anyone else owns 0.

Note: your function should have a default parameter.

For example(Input --> Output):

"anyone else" --> 0
"Zach" --> 18

My Solution

def how_many_light_sabers_do_you_own(name='name')
  return 18 if name == 'Zach'
  0
end