8 kyu

Opposites Attract

67,256 of 193,487jbarget

Description:

Timmy & Sarah think they are in love, but around where they live, they will only know once they pick a flower each. If one of the flowers has an even number of petals and the other has an odd number of petals it means they are in love.

Write a function that will take the number of petals of each flower and return true if they are in love and false if they aren't.

Fundamentals

More By Author:

Check out these other kata created by jbarget

Stats:

CreatedMay 11, 2015
PublishedMay 11, 2015
Warriors Trained253757
Total Skips14030
Total Code Submissions415890
Total Times Completed193487
JavaScript Completions67256
C# Completions10906
Python Completions61955
Haskell Completions1298
CoffeeScript Completions109
Ruby Completions3806
Elixir Completions587
PHP Completions4056
Java Completions18517
Scala Completions775
Groovy Completions145
Julia Completions178
Kotlin Completions2795
Crystal Completions50
Erlang Completions153
C++ Completions11834
TypeScript Completions2733
C Completions4377
R Completions332
NASM Completions87
COBOL Completions53
Rust Completions2156
Go Completions2551
OCaml Completions161
SQL Completions2668
Lua Completions46
Total Stars923
% of votes with a positive feedback rating92% of 11796
Total "Very Satisfied" Votes10190
Total "Somewhat Satisfied" Votes1439
Total "Not Satisfied" Votes167
Ad
Contributors
  • jbarget Avatar
  • jhoffner Avatar
  • wthit56 Avatar
  • ZozoFouchtra Avatar
  • richlewis42 Avatar
  • kalhalla47 Avatar
  • bkaes Avatar
  • cris Avatar
  • Unnamed Avatar
  • AlexIsHappy Avatar
  • suic Avatar
  • AngusJGoldsmith Avatar
  • Chrono79 Avatar
  • kazk Avatar
  • asedov Avatar
  • lilsweetcaligula Avatar
  • MFazio23 Avatar
  • Voile Avatar
  • monadius Avatar
  • Arothe Avatar
  • hobovsky Avatar
  • agutierrez-datio Avatar
  • stellartux Avatar
  • trashy_incel Avatar
  • username0 Avatar
  • SergeySinyavskiy Avatar
  • ejini战神 Avatar
  • akar-0 Avatar
  • Glinator Avatar
  • ZeNiscArioTa Avatar
  • Rakhim92 Avatar
  • Triad-0112 Avatar
  • Gauntlet9868 Avatar
  • KayleighWasTaken Avatar
Ad