[Question]
  [
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.
  
[Answer]
# JavaScript (ES6) 87 bytes
**Edit** 1 byte saved thx ETHProductions  
**Edit** 1 more byte saved thx l4me
An anonymous function. Long, but I didn't find a way to golf this more
```
s=>(l=t=0,s.replace(/[a-z]/ig,c=>l+=++t&&c>'Z'),l/=t,l<.5?1-l+' upp':l+' low')+'ercase'
```
**Less golfed**
```
s=>( // arrow function returning the value of an expression
  // here I use comma for clarity, 
  // in the golfed version it's all merged in a single expression
  t = 0, // counter for letters
  l = 0, // counter for lowercase letters 
  s.replace(
    /[a-z]/ig, // find all alphabetic chars, upper or lowercase
    c => // execute for each found char (in c)
        l += ++t && c>'Z', // increment t, increment l if c is lowercase
  ),
  l /= t, // l is the ratio now
  ( l < .5 // if ratio < 1/2
    ? (1-l) +' upp' // uppercase count / total (+" upp")
    : l +' low'     // lowrcase count / total (+" low")
  ) + 'ercase' // common suffix
)
```
[Answer]
# CJam, 47 45 bytes
```
q__eu-\_el-]:,_:+df/" low upp"4/.+:e>"ercase"
```
[Try it online.](http://cjam.aditsu.net/#code=q__eu-%5C_el-%5D%3A%2C_%3A%2Bdf%2F%22%20low%20upp%224%2F.%2B%3Ae%3E%22ercase%22&input=PrOgRaMiNgPuZzLeS%20%26%20CoDe%20GoLf)
Not golfing for too long...
### Explanation
```
q               e# Read input.
__eu-           e# Get only the lowercase characters.
\_el-           e# Get only the uppercase characters.
]:,             e# Get the lengths of the two strings.
_:+             e# Sum of the lengths.
df/             e# Lengths divided by the sum of the lengths.
" low upp"4/.+  e# Append the first number with " low" and the second " upp"
:e>             e# Find the maximum of the two.
"ercase"        e# Output other things.
```
[Answer]
## [Japt](http://ethproductions.github.io/japt/?v=master&code=QT1VZiJcdyIgbCAvVWYiW0EtWmEtel0iIGwpPr0/QSsiIGxvdyI6MS1BKyIgdXBwIiArYIDW0A==&input=Ind3VyI=), 58 bytes
```
A=Uf"[a-z]" l /Uf"[A-Za-z]" l)>½?A+" low":1-A+" upp" +`ÖÐ
```
(Note: SE stripped a special char, before `Ö`, so please click the link to get the proper code)
[Answer]
# [R](https://www.r-project.org/), ~~133 123 118 108 106 105~~ 104 bytes
Golfed down 10 bytes thanks to @ovs,8 thanks to @Giuseppe, and 10 again thanks to @ngm. At this point it's really a collaborative effort where I provide the bytes and others take them off ;)
```
function(x)cat(max(U<-mean(utf8ToInt(gsub('[^a-zA-Z]',"",x))<91),1-U),c("lowercase","uppercase")[1+2*U])
```
[Try it online!](https://tio.run/##ZY7hS4NAGMa/@1e8nNDu6hw5WKywwBqzwNYw/bJhcLNTBHcnejLznzfNZkUfXnjg5fd7nqKNwTLauBKRSqXANYmYwgdW48AyDpwJXKl44csnoXBSVns82b0xo7GNbTihCNGaEOvaJNQ0AkIjjDJ55EXESo4oqvL8O5OdeTE7D0LS6nameCGY4nDqhL18/wCcSZHwgtxo@rhgsCJAvbmzdc7O/2XDwd10TkKKTm0lz28RIv/ogRw3/ez7ZSGaFmO0KV4Sjz2n62RTbRuXv8IZPMglB0e6MSL65XQ@g9HVE0t5XDvS9sFLnUfVJQUuX/mOZAqCvP8M2OIvtpIS7pnXXTP8r2Cc1X4C "R – Try It Online")
[Answer]
# [MATL](https://esolangs.org/wiki/MATL), 49 ~~50~~ bytes
Uses [current version (4.1.1)](https://github.com/lmendo/MATL/releases/tag/4.1.1) of the language, which is earlier than the challenge.
```
jt3Y2m)tk=Ymt.5<?1w-YU' upp'h}YU' low'h]'ercase'h
```
### Examples
```
>> matl
 > jt3Y2m)tk=Ymt.5<?1w-YU' upp'h}YU' low'h]'ercase'h
 > 
> PrOgRaMiNgPuZzLeS & CoDe GoLf
0.52 uppercase
>> matl
 > jt3Y2m)tk=Ymt.5<?1w-YU' upp'h}YU' low'h]'ercase'h
 > 
> Foo BaR Baz
0.55556 lowercase
```
### Explanation
```
j                   % input string
t3Y2m)              % duplicate. Keep only letters
tk=Ym               % duplicate. Proportion of lowercase letters
t.5<?               % if less than .5
    1w-             % compute complement of proportion
    YU' upp'h       % convert to string and append ' upp'
}                   % else
    YU' low'h       % convert to string and append ' low' 
]                   % end
'ercase'            % append 'ercase'
```
[Answer]
# Julia, ~~76~~ 74 bytes
```
s->(x=sum(isupper,s)/sum(isalpha,s);(x>0.5?"$x upp":"$(1-x) low")"ercase")
```
This is a lambda function that accepts a string and returns a string. To call it, assign it to a variable.
Ungolfed:
```
function f(s::AbstractString)
    # Compute the proportion of uppercase letters
    x = sum(isupper, s) / sum(isalpha, s)
    # Return a string construct as x or 1-x and the appropriate case
    (x > 0.5 ? "$x upp" : "$(1-x) low") * "ercase"
end
```
Saved 2 bytes thanks to edc65!
[Answer]
# [Perl 6](http://perl6.org), ~~91 70 69 63~~ 61 bytes
```
{($/=($/=@=.comb(/\w/)).grep(*~&' 'ne' ')/$/);"{$/>.5??$/!!1-$/} {<low upp>[$/>.5]}ercase"} # 91
```
```
{$/=m:g{<upper>}/m:g{\w};"{$/>.5??$/!!1-$/} {<low upp>[$/>.5]}ercase"} # 70
```
```
{"{($/=m:g{<upper>}/m:g{\w})>.5??$/!!1-$/} {<low upp>[$/>.5]}ercase"} # 69
```
```
{"{($/=m:g{<upper>}/m:g{\w})>.5??"$/ upp"!!1-$/~' low'}ercase"} # 63
```
```
{"{($/=m:g{<:Lu>}/m:g{\w})>.5??"$/ upp"!!1-$/~' low'}ercase"} # 61
```
Usage:
```
# give it a lexical name
my &code = {...}
.say for (
  'PrOgRaMiNgPuZzLeS & CoDe GoLf',
  'DowNGoAT RiGHtGoAt LeFTGoat UpGoAT',
  'Foo BaR Baz',
)».&code;
```
```
0.52 uppercase
0.580645 uppercase
0.555556 lowercase
```
[Answer]
# C#, 135 bytes
Requires:
```
using System.Linq;
```
Actual function:
```
string U(string s){var c=s.Count(char.IsUpper)*1F/s.Count(char.IsLetter);return(c>0.5?c+" upp":1-c+" low")+"ercase";}
```
With explanation:
```
string U(string s)
{
    var c = s.Count(char.IsUpper) // count uppercase letters
               * 1F               // make it a float (less bytes than (float) cast)
               / s.Count(char.IsLetter); // divide it by the total count of letters
    return (c > 0.5 
        ? c + " upp"  // if ratio is greater than 0.5, the result is "<ratio> upp"
        : 1 - c + " low") // otherwise, "<ratio> low"
        + "ercase"; // add "ercase" to the output string
}
```
[Answer]
## Python 2, ~~114~~ 110 bytes
```
i=input()
n=1.*sum('@'<c<'['for c in i)/sum(c.isalpha()for c in i)
print max(n,1-n),'ulpopw'[n<.5::2]+'ercase'
```
[Answer]
# Pyth - 40 bytes
This is the first time i've ever used vectorized string formatting which is pretty cool.
```
Kml-zrzd2eS%Vm+cdsK" %sercase"Kc"upp low
```
[Test Suite](http://pyth.herokuapp.com/?code=Kml-zrzd2eS%25Vm%2BcdsK%22+%25sercase%22Kc%22upp+low&test_suite=1&test_suite_input=PrOgRaMiNgPuZzLeS+%26+CoDe+GoLf%0ADowNGoAT+RiGHtGoAt+LeFTGoat+UpGoAT%0AFoo+BaR+Baz&debug=1).
[Answer]
## Mathematica, ~~139~~ 105 bytes
```
a=ToString;If[(b=1.#~(c=StringCount)~Alphabet[]/c[#,_?LetterQ])<.5,a[1-b]<>" upp",a@b<>" low"]<>"ercase"&
```
[Verbose code is scary](https://codegolf.stackexchange.com/q/67712/33208#comment164146_67712), but I'll have to live with it...
[Answer]
# PHP, 140 129 characters
My first round of golf -- not too bad for a 'standard' language, eh? :-)
Original:
```
function f($s){$a=count_chars($s);for($i=65;$i<91;$i++){$u+=$a[$i];$l+=$a[$i+32];}return max($u,$l)/($u+$l).($u<$l?' low':' upp').'ercase';}
```
Shortened to 129 characters thanks to @manatwork:
```
function f($s){$a=count_chars($s);for(;$i<26;$u+=$a[$i+++65])$l+=$a[$i+97];return max($u,$l)/($u+$l).' '.($u<$l?low:upp).ercase;}
```
With comments:
```
function uclcratio($s)
{
  // Get info about string, see http://php.net/manual/de/function.count-chars.php
  $array = count_chars($s);
  // Loop through A to Z
  for ($i = 65; $i < 91; $i++) // <91 rather than <=90 to save a byte
  {
    // Add up occurrences of uppercase letters (ASCII 65-90)
    $uppercount += $array[$i];
    // Same with lowercase (ASCII 97-122)
    $lowercount += $array[$i+32];
  }
  // Compose output
  // Ratio is max over sum
  return max($uppercount, $lowercount) / ($uppercount + $lowercount)
  // in favour of which, equality not possible per challenge definition
         . ($uppercount < $lowercount ? ' low' : ' upp') . 'ercase';
}
```
[Answer]
# Ruby, 81+1=82
With flag `-p`,
```
$_=["#{r=$_.count(a='a-z').fdiv$_.count(a+'A-Z')} low","#{1-r} upp"].max+'ercase'
```
It's lucky that for numbers between 0 and 1, lexicographic sorting is the same as numeric sorting.
[Answer]
# Common Lisp, 132 bytes
```
(setq s(read-line)f(/(count-if'upper-case-p s)(count-if'alpha-char-p s)))(format t"~f ~aercase"(max f(- 1 f))(if(> f .5)"upp""low"))
```
[Try it online!](https://tio.run/##RYwxDgIxDAS/YqXBLgyioKWg4AH8wAq2LlLuEpKcQBT39RBoKKaa2fUx1Nw7Vm0PqFhU7hzDomR4QJ/WpXGw3ZqzFvZSlTNU@guJeRL2k5SfIEJLZZYGzW0Gm2j5jhzO8gJDhiPYaILhGQz2J3Lj2bmYno6o92tKcJHb4P0B)
[Answer]
## Seriously, 58 bytes
```
" upp"" low"k"ercase"@+╗,;;ú;û+∩@-@-;l@ú@-l/;1-k;i<@╜@ZEεj
```
Hex Dump:
```
22207570702222206c6f77226b2265726361736522402bbb2c3b3ba33b
962bef402d402d3b6c40a3402d6c2f3b312d6b3b693c40bd405a45ee6a
```
It only works on the downloadable interpreter...the online one is still broken.
Explanation:
```
" upp"" low"k"ercase"@+╗                                    Put [" lowercase"," uppercase"]
                                                            in reg0
                        ,;;ú;û+∩@-@-                        Read input, remove non-alpha
                                    ;l@                     Put its length below it
                                       ú@-                  Delete lowercase
                                          l                 Get its length
                                           /                Get the ratio of upper/total
                                            ;1-k            Make list [upp-ratio,low-ratio]
                                                ;i<         Push 1 if low-ratio is higher
                                                   @        Move list to top
                                                    ╜@Z     Zip it with list from reg0
                                                       E    Pick the one with higher ratio
                                                        εj  Convert list to string.
```
[Answer]
# Pyth, 45 bytes
```
AeSK.e,s/LzbkrBG1s[cGshMKd?H"upp""low""ercase
```
[Try it online.](http://pyth.herokuapp.com/?code=AeSK.e%2Cs%2FLzbkrBG1s%5BcGshMKd%3FH%22upp%22%22low%22%22ercase&input=DowNGoAT+RiGHtGoAt+LeFTGoat+UpGoAT&debug=0) [Test suite.](http://pyth.herokuapp.com/?code=AeSK.e%2Cs%2FLzbkrBG1s%5BcGshMKd%3FH%22upp%22%22low%22%22ercase&test_suite=1&test_suite_input=PrOgRaMiNgPuZzLeS+%26+CoDe+GoLf%0ADowNGoAT+RiGHtGoAt+LeFTGoat+UpGoAT%0AFoo+BaR+Baz&debug=0)
### Explanation
```
             rBG1               pair of alphabet, uppercase alphabet
    .e                          map k, b over enumerate of that:
      ,                           pair of
           b                          lowercase or uppercase alphabet
        /Lz                           counts of these characters in input
       s                              sum of that
                                    and
            k                         0 for lowercase, 1 for uppercase
   K                            save result in K
 eS                             sort the pairs & take the larger one
A                               save the number of letters in and the 0 or 1 in H
s[                              print the following on one line:
  cG                              larger number of letters divided by
    shMK                            sum of first items of all items of K
                                    (= the total number of letters)
        d                         space
         ?H"upp""low"             "upp" if H is 1 (for uppercase), otherwise "low"
                     "ercase      "ercase"
```
[Answer]
# CoffeeScript, 104 characters
```
 (a)->(r=1.0*a.replace(/\W|[A-Z]/g,'').length/a.length)&&"#{(r>.5&&(r+' low')||(1-r+' upp'))+'ercase'}"
```
coffeescript was initially trying to pass the intended return value as an argument to the "r" value, which failed and was super annoying because r was a number, not a function. I got around it by placing an `&&` between the statements to separate them. 
[Answer]
# Pyth, ~~54~~ 53
One byte saved thanks to @Maltysen
```
K0VzI}NG=hZ)I}NrG1=hK;ceS,ZK+ZK+?>ZK"low""upp""ercase
```
[Try it online](https://pyth.herokuapp.com/?code=K0VzI%7DNG%3DhZ%29I%7DNrG1%3DhK%3BceS%2CZK%2BZK%2B%3F%3EZK%22low%22%22upp%22%22ercase&input=Foo+BaR+Baz&test_suite=1&test_suite_input=PrOgRaMiNgPuZzLeS+%26+CoDe+GoLf%0ADowNGoAT+RiGHtGoAt+LeFTGoat+UpGoAT%0AFoo+BaR+Baz&debug=0)
```
K0                  " Set K to 0
                    " (Implicit: Set Z to 0)
Vz                  " For all characters (V) in input (z):
  I}NG              " If the character (N) is in (}) the lowercase alphabet (G):
    =hZ             " Increment (=h) Z
  )                 " End statement
  I}NrG1            " If the character is in the uppercase alphabet (rG1):
    =hK             " Increment K
;                   " End all unclosed statements/loops
c                   " (Implicit print) The division of
  e                 " the last element of
    S,ZK           " the sorted (S) list of Z and K (this returns the max value)
+ZK                 " by the sum of Z and K
+                   " (Implicit print) The concatenation of
  ?>ZK"low""upp"    " "low" if Z > K, else "upp"
  "ercase"          " and the string "ercase".
```
[Answer]
# Ruby, 97 characters
```
->s{'%f %sercase'%[(l,u=[/[a-z]/,/[A-Z]/].map{|r|s.scan(r).size}).max.fdiv(l+u),l>u ?:low: :upp]}
```
Sample run:
```
2.1.5 :001 > ['PrOgRaMiNgPuZzLeS & CoDe GoLf', 'DowNGoAT RiGHtGoAt LeFTGoat UpGoAT', 'Foo BaR Baz'].map{|s|->s{'%f %sercase'%[(l,u=[/[a-z]/,/[A-Z]/].map{|r|s.scan(r).size}).max.fdiv(l+u),l>u ?:low: :upp]}[s]}
 => ["0.520000 uppercase", "0.580645 uppercase", "0.555556 lowercase"] 
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 28 bytes
```
ʒ.u}gság/Dò©_αð„Œ„›…#'ƒß«®èJ
```
[Try it online!](https://tio.run/##AVcAqP8wNWFiMWX//8qSLnV9Z3PDoWcvRMOywqlfzrHDsOKAnsWS4oCe4oC64oCmIyfGksOfwqvCrsOoSv//UHJPZ1JhTWlOZ1B1WnpMZVMgJiBDb0RlIEdvTGY "05AB1E – Try It Online")
---
```
ʒ.u}g                        # filter all but uppercase letters, get length.
     ság/                    # Differential between uppercase and input length.
         Dò©                 # Round up store result in register w/o pop.
            _α               # Negated, absolute difference.
              ð              # Push space.
               „Œ„›…         # Push "upper lower"
                    #        # Split on space.
                     'ƒß«    # Concat "case" resulting in [uppercase,lowercase]
                         ®èJ # Bring it all together.
```
[Answer]
# Java 8, ~~136~~ 130 bytes
```
s->{float l=s.replaceAll("[^a-z]","").length();l/=l+s.replaceAll("[^A-Z]","").length();return(l<.5?1-l+" upp":l+" low")+"ercase";}
```
-6 bytes creating a port of [*@ProgramFOX*' C# .NET answer](https://codegolf.stackexchange.com/a/67855/52210).
[Try it online.](https://tio.run/##hVDBSsNAEL33K4Y9SEJMxIMXY5RoaTyksaT10lJhTTdx63Q37G5abMm3x43mVBBhBt7MvBnemy3dU3@7@ewKpFrDlHJxGgFwYZgqacEg60uAuVFcVFA4A9BuaPutTRvaUMMLyEBABJ32708lSmoAIx0oVqO9EyM6ZPVG/eOaXBLiBshEZT4cN8SrCL1zXuwvz3mKmUYJB@@Cm4drHz0CTV2T2x6gPBDXI0wVVDMStl34q6tu3tHqGuTtJd/AzhocPKzW1B3MfWnDdoFsTFDbiUHhiKBwyEy9VDmd8qyaNctjyuZwAU9yzCCRaUncnxf8vT2WhyyR8QJynjwbiwykbLJI@s@81v3k3xMTKeGR5jaPA7cdtd03)
**Explanation:**
```
s->{                  // Method with String as both parameter and return-type
  float l=s.replaceAll("[^a-z]","").length();
                      //  Amount of lowercase
  l/=l+s.replaceAll("[^A-Z]","").length();
                      //  Lowercase compared to total amount of letters
  return(l<.5?        //  If this is below 0.5:
          1-l+" upp"  //   Return `1-l`, and append " upp"
         :            //  Else:
          l+" low")   //   Return `l`, and append " low"
        +"ercase";}   //  And append "ercase"
```
[Answer]
## REXX, 144 bytes
```
a=arg(1)
l=n(upper(a))
u=n(lower(a))
c.0='upp';c.1='low'
d=u<l
say 1/((u+l)/max(u,l)) c.d'ercase'
n:return length(space(translate(a,,arg(1)),0))
```
[Answer]
# [Perl 5](https://www.perl.org/) `-p`, 72 bytes
```
$_=(($u=y/A-Z//)>($l=y/a-z//)?$u:$l)/($u+$l).$".($u>$l?upp:low).'ercase'
```
[Try it online!](https://tio.run/##K0gtyjH9/18l3lZDQ6XUtlLfUTdKX1/TTkMlB8hJ1K0CcuxVSq1UcjT1gQq0gbSeipIekGmnkmNfWlBglZNfrqmnnlqUnFicqv7/v1t@voJTYhAQV/3LLyjJzM8r/q9b8F/X11TPwNAAAA "Perl 5 – Try It Online")
[Answer]
# [Kotlin](https://kotlinlang.org), 138 bytes
## Code
```
let{var u=0.0
var l=0.0
forEach{when{it.isUpperCase()->u++
it.isLowerCase()->l++}}
"${maxOf(u,l)/(u+l)} ${if(u>l)"upp" else "low"}ercase"}
```
## Usage
```
fun String.y():String =let{var u=0.0
var l=0.0
forEach{when{it.isUpperCase()->u++
it.isLowerCase()->l++}}
"${maxOf(u,l)/(u+l)} ${if(u>l)"upp" else "low"}ercase"}
fun main(args: Array<String>) {
    println("PrOgRaMiNgPuZzLeS & CoDe GoLf".y())
    println("DowNGoAT RiGHtGoAt LeFTGoat UpGoAT".y())
    println("Foo BaR Baz".y())
}
```
[Answer]
# Pyth, ~~40~~ 39 bytes
```
Jml@dQrBG1+jdeS.T,cRsJJc2."kw񽙽""ercase
```
[Try it here](http://pyth.herokuapp.com/?code=Jml%40dQrBG1%2BjdeS.T%2CcRsJJc2.%22kw%F1%BD%99%BD%22%22ercase&input=%22DowNGoAT+RiGHtGoAt+LeFTGoat+UpGoAT%22&debug=0)
### Explanation
```
Jml@dQrBG1+jdeS.T,cRsJJc2."kw񽙽""ercase
 m    rBG1                                For the lower and uppercase alphabet...
  l@dQ                                    ... count the occurrences in the input.
J                 cRsJJ                   Convert to frequencies.
               .T,     c2."kw񽙽"          Pair each with the appropriate case.
             eS                           Get the more frequent.
          +jd                    "ercase  Stick it all together.
```
[Answer]
# [PowerShell Core](https://github.com/PowerShell/PowerShell), ~~134~~128 bytes
```
Filter F{$p=($_-creplace"[^A-Z]",'').Length/($_-replace"[^a-z]",'').Length;$l=1-$p;(.({"$p upp"},{"$l low"})[$p-lt$l])+"ercase"}
```
[Try it online!](https://tio.run/##fVJhT8IwEP0Mv@LSVN3CikCiURcSUTL8gGIQv7hMM8cBS5q1bl00zP12bBli0EiTJu27d6/v7irFO6bZAjlnkUhx5eVJpGKRwAQzVS/qNapyyRG6cGnZbm17b3TBsch9OpqPw9v4bn6fPy2H@ACHcC36CAMxnBGHtJonHcilxDQKMyS2@yu/L97vBqI3gXE8uFH6pGCI3mQgQgWP0kQqkbN9Ip4QcBWO9V5W7FPgpqp/2KNqaWp7n@pMVGvN29XbMj/hAAqo1/Rdd0v3iL74rcA1AH5IjBROK7AdaMzAKWY5XzPXGZ/gGdSYwMTA/m2oFsHFxVjkydTypyJ/5RhYmzyWouRhhMR/brHzZtAgztGR7XTsSjzLZ7P4w4j/oYds2WPLKsHdMUJosXm@BFpUEiVxN363ZTB8@5bVsbJerryYK0zBK6jsWvSFRT@v9dhTsLbWHGIyV4tjE98xsxN2Ke@2GZWu1bQKQqUZCykdfeSm86S0fSoZV5QHdoNsBlGuzA9dfQE "PowerShell Core – Try It Online")
Thanks, [Veskah](https://codegolf.stackexchange.com/users/78849/veskah), for saving six bytes by converting the function to a filter!
[Answer]
# [Tcl](http://tcl.tk/), 166 bytes
```
proc C s {lmap c [split $s ""] {if [string is u $c] {incr u}
if [string is lo $c] {incr l}}
puts [expr $u>$l?"[expr $u./($u+$l)] upp":"[expr $l./($u+$l)] low"]ercase}
```
[Try it online!](https://tio.run/##VY9NSwMxFEX3@RWXEEQRdN@FolM6XYy1jHVjO4sQ0iGQzgv5oNIhv31MC4W6ePDePW9xblR2mpwnhQoBoz1IB4VtcNZEiADOO4xmX5LozdDDBCQIdQ4H5ZEy@w8t3VCbM3MpBmz1r/MQ6UXYV349np7vRXoU9qFDco7PrsDeAEtH3mmvZNB5usgVScbX/rNv5YdZ9ev0c2r0F@5Q0VyjpmbPGZ/TcVXT2watqZexbBGNXmxqkhHf7kzK04II77Itc@IsY7yY7gYRZqwq1fP0Bw "Tcl – Try It Online")
[Answer]
# APL(NARS), 58 char, 116 bytes
```
{m←+/⍵∊⎕A⋄n←+/⍵∊⎕a⋄∊((n⌈m)÷m+n),{m>n:'upp'⋄'low'}'ercase'}
```
test:
```
  h←{m←+/⍵∊⎕A⋄n←+/⍵∊⎕a⋄∊((n⌈m)÷m+n),{m>n:'upp'⋄'low'}'ercase'}
  h "PrOgRaMiNgPuZzLeS & CoDe GoLf"
0.52 uppercase
  h "DowNGoAT RiGHtGoAt LeFTGoat UpGoAT"
0.5806451613 uppercase
  h "Foo BaR Baz"
0.5555555556 lowercase
```
[Answer]
# C, 120 bytes
```
f(char*a){int m=0,k=0,c;for(;isalpha(c=*a++)?c&32?++k:++m:c;);printf("%f %sercase",(m>k?m:k)/(m+k+.0),m>k?"upp":"low");}
```
test and result:
```
main()
{char *p="PrOgRaMiNgPuZzLeS & CoDe GoLf", *q="DowNGoAT RiGHtGoAt LeFTGoat UpGoAT", *m="Foo BaR Baz";
 f(p);printf("\n");f(q);printf("\n");f(m);printf("\n");
}
```
results
```
0.520000 uppercase
0.580645 uppercase
0.555556 lowercase
```
It suppose Ascii character set.
[Answer]
Javascript 80 characters
I'm bad at this but here was my go at Javascript:
```
a=(s)=>{let a=0,b=0;for(c in s)s[c]==s[c].toUpperCase()?a++:b++;return a/(a+b);}
```
Readable version:
```
a=(s)=>{
    let a=0,b=0;
    for(c in s)
        s[c]==s[c].toUpperCase()?a++:b++;
    return a/(a+b);
}
```
Function is called with: `a('hEllO')` which outputs `0.4` for example.
I feel like there must be a way to condense the arrow function or something with the words return or toUpperCase that I can do.
]