A string is dot-heavy when its morse representation contains more dots than dashes. For example, the letter E is a single dot, which means it is Dot-heavy.
Input
- The input string will only contain characters in the range of
[a-z]
or[A-Z]
. You can decide if they should all be upper case, or all lower case.AAA
is fine,aaa
is fine,aAa
is not. - The input string will always be at least 1 character in length.
- You may assume that input strings will never have an equal amount of dots and dashes.
Output
You should return Truthy for inputs that contain more dot characters.
You should return Falsy for inputs that contain more dash characters.
Edit: I will allow a positive value for dot and a negative value for dash as well.
Test cases
| input | morse representation | result |
|------------------------------------------------|
| S | ... | Truthy |
| k | -.- | Falsy |
| HELLO | .... . .-.. .-.. --- | Truthy |
| code | -.-. --- -.. . | Falsy |
Reference
This is code-golf. Shortest code in bytes wins.