Skip to content

Latest commit

 

History

History
35 lines (19 loc) · 477 Bytes

Even_or_Odd.md

File metadata and controls

35 lines (19 loc) · 477 Bytes

CodeWars Python Solutions


Even or Odd

Definition

Create a function (or write a script in Shell) that takes an integer as an argument and returns "Even" for even numbers or "Odd" for odd numbers.


Given Code

def even_or_odd(number):
    pass

Solution

def even_or_odd(number):
    return "Even" if number % 2 == 0 else "Odd"

See on CodeWars.com