28
2
In this challenge you and your friends are debating on which case is better, uppercase or lowercase? To find out, you write a program to do this for you.
Because esolangs scare your friends, and verbose code scares you, your code will need to be as short as possible.
Examples
PrOgRaMiNgPuZzLeS & CoDe GoLf
0.52 uppercase
DowNGoAT RiGHtGoAt LeFTGoat UpGoAT
0.58 uppercase
Foo BaR Baz
0.56 lowercase
Specifications
The input will consist only of ASCII characters. All non-alphabetic characters should be ignored. There will be at least 1 character of each case
The output should be the amount of the case that appears the most often over the total amount of alphabetic characters. It should be a decimal accurate to at least 2 decimal places. If uppercase appears more often, the output should end with uppercase
, or lowercase
.
There will never the the same amount of uppercase and lowercase characters.
7Esolangs do not scare my friends. Does that mean my code can be wildly verbose? – Alex A. – 2015-12-25T17:21:32.883
@AlexA. verbose code scares you, so your code will also need to be golfed. – Downgoat – 2015-12-25T17:22:27.247
16Oh right, I had forgotten about my recurring Java nightmares. – Alex A. – 2015-12-25T17:23:09.470
4Will there be input with only one case? – manatwork – 2015-12-25T18:02:35.180
1Does "accurate to at least 2 decimal places" require at least two decimals to be printed, or can a second decimal of zero be left out? – hvd – 2015-12-25T23:03:25.907
@hvd a second decimal of zero may be left out or kept. Your choice – Downgoat – 2015-12-27T16:20:07.443
There will be at least 1 character of each case
I think you mean1 alphabetic character
? – l4m2 – 2018-05-08T00:54:54.887