Skip to content

Latest commit

 

History

History
39 lines (21 loc) · 891 Bytes

The_Wide-Mouthed_frog.md

File metadata and controls

39 lines (21 loc) · 891 Bytes

CodeWars Python Solutions


The Wide-Mouthed frog!

The wide mouth frog is particularly interested in the eating habits of other creatures.

He just can't stop asking the creatures he encounters what they like to eat. But then he meet the alligator who just LOVES to eat wide-mouthed frogs!

When he meets the alligator, it then makes a tiny mouth.

Your goal in this kata is to create complete the mouth_size method this method take one argument animal which corresponds to the animal encountered by frog. If this one is an alligator (case insensitive) return small otherwise return wide.


Given Code

def mouth_size(animal):
  # code here

Solution

def mouth_size(animal):
  return "small" if animal.lower() == "alligator" else "wide"

See on CodeWars.com