We all use 16:9, 16:10, 4:3 etc. ratios every day. Main task is to determine image ratio by its width and height dimensions. 
Function should take width and height of an image and return a ratio string (ex."16:9").
If any of width or height entry is 0 function should throw an exception (or return `Nothing`).
from fractions import gcd
def calculate_ratio(w,h):
    c = gcd(w, h)
    return "{}:{}".format(w/c, h/c) if w > 0 and h > 0 else 'You threw an error' 
from fractions import gcd
def calculate_ratio(w,h):
    c = gcd(w, h)
    return "{}:{}".format(w/c, h/c) if w > 0 and h > 0 else 'You threw an error' 