Screen Link: Learn data science with Python and R projects
def english(a): non_english = 0 for character in a: if ord(character) > 127: non_english += 1 if non_english > 3: return False else: return True print (english ('Instagram')) print (english ('爱奇艺PPS -《欢乐颂2》电视剧热播')) print (english ('Docs To Go™ Free Office Suite')) print (english ('Instachat 😜'))
What I expected to happen:
What actually happened:
True True True True
I wrote a code to check if the name of an app contains more than three non-English characters. I was expecting to see False printed in the third row but that was also returned as True. Can someone help with this?