Ad
Code
Diff
  • def even_or_odd(n):
        return "Odd" if n % 2 else "Even" # 0 is False, every other number is True
            
    • def even_or_odd(n):
    • if n % 2 == 0:
    • return "Even"
    • else:
    • return "Odd"
    • return "Odd" if n % 2 else "Even" # 0 is False, every other number is True