8 kyu

Drink about

21,164 of 51,679darlanmendonca

Description:

  • Kids drink toddy.
  • Teens drink coke.
  • Young adults drink beer.
  • Adults drink whisky.

Make a function that receive age, and return what they drink.

Rules:

  • Children under 14 old.
  • Teens under 18 old.
  • Young under 21 old.
  • Adults have 21 or more.

Examples: (Input --> Output)

13 --> "drink toddy"
17 --> "drink coke"
18 --> "drink beer"
20 --> "drink beer"
30 --> "drink whisky"
Fundamentals

Stats:

CreatedOct 9, 2015
PublishedOct 9, 2015
Warriors Trained63261
Total Skips3012
Total Code Submissions127429
Total Times Completed51679
JavaScript Completions21164
Python Completions17833
CoffeeScript Completions103
C# Completions2682
F# Completions304
PHP Completions1945
Ruby Completions663
C++ Completions6497
Haskell Completions221
COBOL Completions29
Crystal Completions8
Julia Completions31
C Completions800
TypeScript Completions493
Scala Completions36
Lua Completions47
Java Completions217
Total Stars237
% of votes with a positive feedback rating90% of 3915
Total "Very Satisfied" Votes3238
Total "Somewhat Satisfied" Votes577
Total "Not Satisfied" Votes100
Ad
Contributors
  • darlanmendonca Avatar
  • jhoffner Avatar
  • SagePtr Avatar
  • acraileanu Avatar
  • CrazyMerlyn Avatar
  • Jotha Avatar
  • CorsaiR Avatar
  • myjinxin2015 Avatar
  • donaldsebleung Avatar
  • aweleshetu Avatar
  • kazk Avatar
  • neilm Avatar
  • Souzooka Avatar
  • rowcased Avatar
  • hobovsky Avatar
  • cliffstamp Avatar
  • davidamey Avatar
  • user8436785 Avatar
  • SergeySinyavskiy Avatar
  • ejini战神 Avatar
  • julysfire Avatar
  • akar-0 Avatar
  • Kacarott Avatar
  • KayleighWasTaken Avatar
  • metatable Avatar
Ad