Kodewick
Start learning →
Starter←→0 / 100

How many ha

#032StarterStrings2 min

A friend sends you a message and you want to know how hard they laughed. Write count_ha(message) to return how many ha are in it, any case (Ha and HA count too).

Examples
count_ha("hahaha")→3
count_ha("Ha ha, so funny")→2
count_ha("hello")→0
main.py
def count_ha(message):
    # your code here: lower case, then count "ha"
    return 0
Ctrl + Enter runs too
Result

Run tries the examples. When they look right, Submit.