7 kyu

Odd or Even?

51,977 of 146,856ethaning

Description:

Task:

Given a list of integers, determine whether the sum of its elements is odd or even.

Give your answer as a string matching "odd" or "even".

If the input array is empty consider it as: [0] (array with a zero).

Examples:

Input: [0]
Output: "even"

Input: [0, 1, 4]
Output: "odd"

Input: [0, -1, -5]
Output: "even"

Have fun!

Fundamentals
Arrays

More By Author:

Check out these other kata created by ethaning

Stats:

CreatedJun 20, 2017
PublishedJun 20, 2017
Warriors Trained180903
Total Skips12078
Total Code Submissions284055
Total Times Completed146856
JavaScript Completions51977
Java Completions16202
Crystal Completions64
C# Completions7664
Haskell Completions962
PHP Completions4696
Python Completions49548
Ruby Completions3050
Groovy Completions131
NASM Completions74
Rust Completions2062
Julia Completions108
TypeScript Completions2841
Prolog Completions60
C Completions3105
CFML Completions29
Clojure Completions199
C++ Completions5697
CoffeeScript Completions22
Dart Completions1049
Lua Completions217
Scala Completions94
RISC-V Completions13
Total Stars665
% of votes with a positive feedback rating92% of 9864
Total "Very Satisfied" Votes8419
Total "Somewhat Satisfied" Votes1272
Total "Not Satisfied" Votes173
Total Rank Assessments56
Average Assessed Rank
7 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • ethaning Avatar
  • Unnamed Avatar
  • GiacomoSorbi Avatar
  • matt c Avatar
  • donaldsebleung Avatar
  • romerojp Avatar
  • Chrono79 Avatar
  • imjasonmiller Avatar
  • JohanWiltink Avatar
  • B1ts Avatar
  • Blind4Basics Avatar
  • user7657844 Avatar
  • barakplasma Avatar
  • Voile Avatar
  • k.steflovic Avatar
  • Souzooka Avatar
  • Bubbler Avatar
  • rsa Avatar
  • clcraig Avatar
  • FArekkusu Avatar
  • monadius Avatar
  • hobovsky Avatar
  • uniapi Avatar
  • stellartux Avatar
  • user8436785 Avatar
  • ndorgu Avatar
  • ejini战神 Avatar
  • tobeannouncd Avatar
  • fcr-- Avatar
  • KayleighWasTaken Avatar
Ad