Skip to content

Latest commit

 

History

History
38 lines (21 loc) · 755 Bytes

Keep_up_the_hoop.md

File metadata and controls

38 lines (21 loc) · 755 Bytes

CodeWars Python Solutions


Keep up the hoop

Alex just got a new hula hoop, he loves it but feels discouraged because his little brother is better than him

Write a program where Alex can input (n) how many times the hoop goes round and it will return him an encouraging message :)

  • If Alex gets 10 or more hoops, return the string "Great, now move on to tricks".
  • If he doesn't get 10 hoops, return the string "Keep at it until you get it".

Given Code

def hoop_count(n):
    pass

Solution

def hoop_count(n):
    return "Great, now move on to tricks" if n >= 10 else "Keep at it until you get it"

See on CodeWars.com