Everybody knows the classic ["half your age plus seven"](https://en.wikipedia.org/wiki/Age_disparity_in_sexual_relationships#The_.22half-your-age-plus-seven.22_rule) dating rule that a lot of people follow (including myself). It's the 'recommended' age range in which to date someone. 




```minimum age <= your age <= maximum age```
#Task

Given an integer (1 <= n <= 100) representing a person's age, return their minimum and maximum age range.

This equation doesn't work when the age <= 14, so use this equation instead:
```
min = age - 0.10 * age
max = age + 0.10 * age
```
You should floor all your answers so that an integer is given instead of a float (which doesn't represent age). ```Return your answer in the form [min]-[max]```

##Examples:

```
age = 27   =>   20-40
age = 5    =>   4-5
age = 17   =>   15-20
```

Difficulty: introductory

Starter code:

def dating_range(age):
	

Solutions:
def dating_range(age):
    if age <= 14:
        min = age - 0.10 * age
        max = age + 0.10 * age
    else:
        min = (age/2)+7
        max = (age-7)*2
        
    return str(int(min))+'-'+str(int(max))

def dating_range(age):
    if age <= 14:
        return "{}-{}".format(int(age-0.1*age), int(age+0.1*age))
    return "{}-{}".format(int(age/2+7), int((age-7)*2))

def dating_range(age):
    if age > 14:
        lo = age / 2 + 7
        hi = (age - 7) * 2
    else:
        lo = 0.9 * age
        hi = 1.1 * age
    return '%d-%d' % (lo, hi)


def dating_range(age):
    if age < 15:
        return "%d-%d" % (.9*age, 1.1*age)
    else:
        return "%d-%d" % (age/2 + 7, (age - 7) * 2)

def dating_range(age):
    return "{}-{}".format(int(age*0.9),int(age*1.1)) if age<=14 else "{}-{}".format(int(age/2+7),int((age-7)*2))

def dating_range(age):
    if age > 14:
        maximum = (age - 7) * 2
        minimum = age / 2 + 7
    else:
        maximum = age + 0.10 * age
        minimum = age - 0.10 * age
    return '{}-{}'.format(int(minimum), int(maximum))


def dating_range(age):
    return ['%d-%d'%(age-.10*age, age+.10*age), '%d-%d'%(age/2+7, (age-7)*2)][age>14]

def dating_range(age):
    return f"{age // 2 + 7}-{2 * age - 14}" if age > 14 else f"{age * 9 // 10}-{age * 11 // 10}"


def dating_range(age):
  return f'{int(age/2+7)}-{(age-7)*2}' if age > 14 else f'{int(0.9*age)}-{int(1.1*age)}'

def dating_range(age):
    return "{}-{}".format(int(age-0.1*age) if age <=14 else (age//2)+7,int(age+0.1*age) if age <=14 else (age-7)*2)

dating_range = lambda a: "{}-{}".format(int(a-0.1*a if a <= 14 else a/2+7), int(a+0.1*a if a <= 14 else (a-7)*2))

def dating_range(age):
    return '%d-%d' %(age-0.1*age, age+0.1*age) if age <= 14 else '%d-%d' %(age/2+7, (age-7)*2)

def dating_range(age):
    if age>14:
        return str(age//2+7) + '-' + str((age-7)*2)
    else:
        return (str(int(age*0.9)) + '-' + str(int(age*1.1)))

def dating_range(age):
    if age > 14:
        a = age / 2 + 7
        b = (age - 7) * 2
    else:
        a = age - 0.10 * age
        b = age + 0.10 * age

    return f'{int(a)}-{int(b)}'

def dating_range(age, x=2, y=7, z=.1):
    return '%d-%d' % ((age / x + y, x * (age - y)) if age > x * y else (age * (1 - z), age * (1 + z)))

def dating_range(age, x=2, y=7, z=.1):
    return f'{age // x + y}-{x * (age - y)}' if age > x * y else f'{int(age * (1 - z))}-{int(age * (1 + z))}'

def dating_range(age):
    min_age = age // 2 + 7 if age > 14 else 9*age//10
    max_age = 2 * (age - 7) if age > 14 else 11*age//10
    return f"{min_age}-{max_age}"

from math import ceil
def dating_range(age):
    if age<=14:
        return f'{age-ceil(age/10)}-{age+(age//10)}'
    return f'{age//2+7}-{(age-7)*2}'

def dating_range(age):
    return f'{age // 2 + 7}-{(age - 7) * 2}' if age > 14 else f'{int(age * 0.9)}-{int(age * 1.1)}'

import math
def dating_range(age):
    if age>14:
        return '-'.join(map(str,[age//2+7,2*(age-7)]))
    return '-'.join(map(str,map(math.floor,[age*0.9,age*1.1])))

def dating_range(age):
    min, max = (age / 2.0) + 7, (age - 7) * 2.0
    if age <= 14:
        min, max = age - 0.10 * age, age + 0.10 * age
    return "{}-{}".format(int(min), int(max))

from math import floor

def dating_range(age: int) -> str:
    """ Get the minimum and maximum age range for dating. """
    return f"{floor(age / 2 + 7)}-{floor((age - 7) * 2)}" if age > 14 else f"{floor(age - 0.10 * age)}-{floor(age + 0.10 * age)}"

dating_range = \
lambda x: "%s-%s" % ((str(int(x - 0.10 * x))), (str(int(x + 0.10 * x)))) if x <= 14 \
else "%s-%s" % ((str(int(x/2+7))), (str(int(x-7)*2)))

dating_range = lambda age : str (age // 2 + 7) + "-" + str ((age - 7) * 2) if (age > 14) else str (int (age - 0.10 * age)) + "-" + str (int (age + 0.10 * age));

from math import floor

def dating_range(age):
    min = floor(age / 2 + 7) if age > 14 else floor(age - 0.1 * age)
    max = floor((age - 7) * 2) if age > 14 else floor(age + 0.1 * age)
    return f"{min}-{max}"

def dating_range(age):
    if age > 14:
        min = int(age/2+7)
        max = int((age-7)*2)
    else:
        min = int(age - 0.1*age)
        max = int(age + 0.1*age)
    r = str(min)
    r += "-"
    r += str(max)
    return r


def first(age):
    min_age = str(int(age / 2 + 7))
    max_age = str(int((age - 7) * 2))
    return [min_age, max_age]

def second(age):
    min_age = str(int(age - 0.10 * age))
    max_age = str(int(age + 0.10 * age))
    return [min_age, max_age]

def dating_range(age):
    return ['-'.join(first(age)), '-'.join(second(age))][(age <= 14)]

def dating_range(age):
    if age < 14:
        min = age - 0.10 * age
        max = age + 0.10 * age
    else:
        min = age/2 + 7
        max = (age - 7)*2
    return "{}-{}".format(int(min), int(max))

def dating_range(age):
    min_14 = str(int(age - 0.10 * age))
    max_14 = str(int(age + 0.10 * age))
    min = str(int(age/2 + 7))
    max = str(int((age-7)*2))
    if age <= 14: return(min_14 + "-" + max_14)
    else: return (min + "-" + max)

from math import floor

def dating_range(age):
    if age >= 14:
        min = floor(age / 2) + 7
        max = (age - 7) * 2   
    else:
        min = floor(age - 0.10 * age)
        max = floor(age + 0.10 * age)
        
    return f'{min}-{max}'

def dating_range(age):
    return f'{int(age/2+7)}-{int((age-7)*2)}' if age>14 else f'{int(age-(.10*age))}-{int(age+(.10*age))}'

def dating_range(age):
    return '%d-%d' % (age//2 + 7, 2*(age - 7)) if age > 14 else '%d-%d' % (9*age//10, 11*age//10)

def dating_range(age):
    if age<=14:
        minage = int(age - 0.1*age)
        maxage = int(age + 0.1*age)
    else:
        minage = int(age/2 + 7)
        maxage = int((age-7)*2)
        
    return f"{minage}-{maxage}"

def dating_range(age):
    min_over = age//2 + 7
    max_over = (age - 7)*2
    min_under = int(age - 0.10 * age)
    max_under = int(age + 0.10 * age)
    return f'{min_over}-{max_over}' if age > 14 else f'{min_under}-{max_under}'

import math

def dating_range(age):
    if age <= 14:
        min = math.floor(age - 0.10 * age)
        max = math.floor((age + 0.10 * age))
        return f"{min}-{max}"
    else:
        min = math.floor(age/2 + 7)
        max = math.floor((age-7)*2)
        return f"{min}-{max}"

def dating_range(age):
    if age>=15:
        min_age =int(age/2+7)
        max_age =(age-7)*2
    else:
        min_age =int(age - 0.10 * age)
        max_age = int(age + 0.10 * age)
        
      
    
    return  f"{min_age}-{max_age}"

from math import floor

def dating_range(age):
    if age <= 14:
        mn = floor(age - 0.1 * age)
        mx = floor(age + 0.1 * age)
    else:
        mn = age // 2 + 7
        mx = (age - 7) * 2
    
    
    return f'{mn}-{mx}'

def dating_range(age):
    if age <= 14:
        return f'{int(age * 0.9)}-{int(age * 1.1)}'
    return f'{age // 2 + 7}-{(age - 7) * 2}'

def dating_range(age):
    if age <= 14:
        min = int(age - 0.1*age)
        max = int(age + 0.1*age)
        return f'{min}-{max}'
    else:
        min = int((age//2) + 7)
        max = int((age-7) * 2)
        return f'{min}-{max}'

def dating_range(age):
    return f'{age//2+7}-{(age-7)*2}' if age>14 else f'{int(age*0.9)}-{int(age*1.10)}'

def dating_range(age):
    if age > 12:
        return str(int(age/2+7)) + '-' + str(int((age-7)*2))
    else:
        return str(int(age-0.10*age)) + '-' + str(int(age+0.10*age)) 

def dating_range(age):
    return f'{int(age-age*.10)}-{int(age+age*.10)}' if age <= 14 else f'{age//2+7}-{(age-7)*2}'

def dating_range(age):
    min_age = int(age / 2 + 7)
    max_age = int((age - 7) * 2)
    return age >= 14 and f"{min_age}-{max_age}" or f"{int(age - 0.10 * age)}-{int(age + 0.10 * age)}"

def dating_range(age):
    return f'{int(age/2 + 7)}-{2 * (age -7)}' if age > 14 else f'{int(age - 0.10 * age)}-{int(age + 0.10 * age)}'

from math import floor
def dating_range(age):
    
    if age > 14:
        min = age / 2 + 7
        max = (age - 7) * 2
    else:
        min = age - 0.10 * age
        max = age + 0.10 * age
        
    return f'{floor(min)}-{floor(max)}'

def dating_range(age):
    if age > 14: mn, mx = age//2 + 7, (age-7)*2
    else: mn, mx = int(age*.9), int(age*1.1)
    return f"{mn}-{mx}"

import numpy as np
def dating_range(age):
    if age>14:
        return f"{int(np.floor((age/2)+7))}-{int(np.floor((age-7)*2))}"
    else:
        return f"{int(np.floor(age - (0.10 * age)))}-{int(np.floor(age + (0.10 * age)))}"

def dating_range(age):
    k = (age*0.5 + 7, age*2 - 14) if age > 14 else (age - 0.1 * age, age + 0.1 * age)
    return '{}-{}'.format(int(k[0]), int(k[1]))

from math import floor
def dating_range(age):
    min_age = floor(age * .5 + 7 if age > 14 else age * .9)
    max_age = floor(age * 2 - 14 if age > 14 else age * 1.1)
    return "{}-{}".format(min_age, max_age)

def dating_range(age):
    return f'{age//2+7}-{(age-7)*2}' if age>=14 else f'{int(age-0.10*age)}-{int(age+0.10*age)}'

from math import ceil
def dating_range(age):
    if age <= 14:
        return f'{age-ceil(age/10)}-{age+int(age/10)}'
    return f'{age//2+7}-{2*(age-7)}'

import math
def dating_range(age):
    if age > 14:
        a = (age/2) + 7
        b = (age - 7) * 2
        a = math.floor(a)
        b = math.floor(b)
        return str(a) + "-" + str(b)
    if age <= 14: 
        a = age - (0.1 * age)
        b = age + (0.1 * age)
        a = math.floor(a)
        b = math.floor(b)
        return str(a) + "-" + str(b)

def dating_range(age):
    if age <= 14:
        return f'{int(age - 0.1 * age)}-{int(age + 0.1 * age)}'
    return f'{age//2 + 7}-{(age-7)*2}'

def dating_range(age):
    import math
    if age <=14:
        return f'{math.floor((age - 0.10 * age))}-{math.floor((age + 0.10 * age))}'
    else:
        return f'{(math.floor(age/2+7))}-{math.floor((2*(age-7)))}'

def dating_range(age):
    if age <= 14:
        return f"{int(age - age * 0.1)}-{int(age + age * 0.1)}"
    return f"{int(age/2 + 7)}-{int((age - 7) * 2)}"

from math import floor

def dating_range(age):
    if age <= 14:
        min = floor(age - 0.1 * age)
        max = floor(age + 0.1 * age)
        return f'{min}-{max}'
    return f'{floor(age//2+7)}-{floor((age-7)*2)}'

def dating_range(age):
    return f"{int(age - 0.1 * age)}-{int(age + 0.1 * age)}" if age <= 14 else f"{age // 2 + 7}-{(age - 7) * 2}"

import math
def dating_range(age):
    if age<=14:
        min=age-math.ceil(0.10*age)
        max=age+math.floor(0.10*age)
    else:
        min=(age//2)+7
        max=(age-7)*2
    return f'{min}-{max}'

def dating_range(age):
    if age>14:
        return str(int(age/2+7))+'-'+str(2*age-14)
    return str(int(0.9*age))+'-'+str(int(1.1*age))

def dating_range(age):
    min = age/2 + 7 if age > 14 else age-0.1*age
    max = (age-7)*2 if age > 14 else age+0.1*age
    return "{}-{}".format(int(min), int(max))

from math import floor
def dating_range(age):
    return f"{age // 2 + 7}-{(age - 7) * 2}" if age > 14 else f"{floor(age - age / 10)}-{age + age // 10}"

def dating_range(age):
    if age>14:
        return f'{(age)//2 +7}-{2*(age-7)}'
    else:
        return f'{int(age-age/10)}-{int(age+age/10)}'

def dating_range(age):
    if age >14:
        return str(int(age/2+7)) +"-"+str((age-7)*2)
    else:
        return str(int(age-0.1*age))+"-"+str(int(age+0.1*age))

import math
def dating_range(age):
    return "{}-{}".format(math.floor(age - 0.10 * age), math.floor(age + 0.10 * age)) if age < 14 else "{}-{}".format(math.floor(age / 2 + 7), math.floor((age - 7) * 2))

def dating_range(age):
    return "%d-%d" % (age//2 +7,(age-7)*2) if age > 14 else "%d-%d" % (int(age-0.1*age),int(age+0.1*age))

import math
def dating_range(age):
    return f"{math.floor(age/2+7)}-{(age-7)*2}" if int(age)>14 else f"{int(age-.1*age)}-{int(age+.1*age)}"


import math

def dating_range(age):
    if age <= 14:
        return f'{math.floor(age - 0.10 * age)}-{math.floor(age + 0.10 * age)}'
    return f'{age // 2 + 7}-{(age - 7) * 2}'

def dating_range(age):
    if age<=14 : return f"{int(age-0.1*age)}-{int(age+0.1*age)}"
    return f"{7+age//2}-{(age-7)*2}"

import math
def dating_range(age):
    if age >= 14:
        max = (age - 7) * 2
        min = (age/2) + 7
    else:
        min = age - .1 * age
        max = age + .1 * age
    return str(math.floor(min)) + '-' + str(math.floor(max))


def dating_range(age):
    if age <= 14:
        mini = int(age - 0.1 * age)
        maxi = int(age + 0.1 * age)
    else:
        mini = age//2+7
        maxi = (age-7)*2
    return "{}-{}".format(mini, maxi)

def dating_range(age):
    if age < 15:
        return f'{int(0.9 * age)}-{int(1.1 * age)}'
    return f'{7 + age // 2}-{2 * (age - 7)}'

def dating_range(age):
    if age <= 14:
        min_age = int(age - 0.1*age)
        max_age = int(age + 0.1*age)
    else:
        min_age = int(age/2 + 7)
        max_age = int((age-7)*2)
    return f"{min_age}-{max_age}"

def dating_range(age):
    if age > 14:
        min = age / 2 + 7
        max = (age - 7) * 2
    elif age <= 14:
        min = age - 0.10 * age
        max = age + 0.10 * age
    return f"{int(min)}-{int(max)}"

from math import floor

def dating_range(age):
    if age <= 14:
        return f"{floor(0.9*age)}-{floor(1.1*age)}"
    return f"{age // 2 + 7}-{2*(age - 7)}"

import math
def dating_range(age):
    #return min-max
    min=0
    max=0
    if age<=14:
        min = math.floor(age - 0.10 * age)
        max = math.floor(age + 0.10 * age)
    else:
        min=math.floor(age/2)+7
        max=2*(age-7)
    return str(min)+'-'+str(max)

def dating_range(y):
    """
    rename or delete
    """
    return str((y//2)+7)+'-'+str(2*(y-7)) if y>14 else str(int(.9*y))+'-'+str(int(1.1*y))

def dating_range(age):
    return f"{int(age/2+7)}-{(age-7)*2}" if age>=14 else f"{int(age-(0.1*age))}-{int(age+(0.1*age))}"

def dating_range(age):
    if age<15 : return str(int(age*0.9))+'-'+str(int(age*1.1))
    return str((age//2+7)//1)+'-'+str((age-7)*2//1)

from math import floor
def dating_range(age):

    if age <= 14:
        min = floor(age - .1 * age)
        max = floor(age + .1 * age)
        return ("{}-{}").format(min,max)
    min = age // 2 + 7
    max = (age - 7) * 2
    return ("{}-{}").format(min,max)


import math
def dating_range(age):
    if 14 < age <= 100: return '%i-%i' % (math.floor(age/2)+7, (age-7)*2)
    else: return '%i-%i' % (math.floor(age-(age*0.1)), age + math.floor(age * 0.1))


from math import floor

def dating_range(age):
    if age <= 14:
        return f'{floor(age - (0.1 * age))}-{floor(age + (0.1 * age))}'
    else:
        return f'{floor((age/2) + 7)}-{floor((age-7) * 2)}'

def dating_range(age):
    if age > 14:
        a = int(age / 2 + 7)
        b = (age - 7) * 2
    else:
        a = int(age - 0.10 * age)
        b = int(age + 0.10 * age)

    return f'{min(a, b)}-{max(a, b)}'

def dating_range(age):
    min = int((age / 2) + 7)
    max = int((age -7) * 2)
    small_min = int(age - 0.10 * age)
    small_max = int(age + 0.10 * age)
    return str(min) + "-" + str(max) if age > 14 else str(small_min) + "-" + str(small_max)

from math import floor

def dating_range(age):
    if age <= 14:
        return f'{floor(age * 0.9)}-{floor(age * 1.1)}'
    else:
        return f'{floor(age / 2 + 7)}-{floor((age - 7) * 2)}'


def dating_range(age):
    if age <= 14:
        msg = str(int(age * 0.9)) + "-" + str(int(age * 1.1))
    else:
        msg = str(int(age/2)+7) + "-" + str((age-7)*2)
    return msg

def dating_range(age):
    if age <= 14:
        min = age - age / 10
        max = age + age / 10
    else:
        min = age / 2 + 7
        max = 2 * (age - 7)
    return "%d-%d" % (int(min), int(max))

def dating_range(age):
    if age <= 14:
        min = int(age - age / 10)
        max = int(age + age / 10)
    else:
        min = int(age / 2 + 7)
        max = int(2 * (age - 7))
    return "{}-{}".format(min, max)


from math import floor
def dating_range(age):
    if age <= 14:
        mini = [str(floor(age-0.10*age))]
        maxi = [str(floor(age+0.10*age))]
        return '-'.join(mini+maxi)
    else:
        mini = [str(floor(age/2+7))]
        maxi = [str(floor((age-7)*2))]
        return '-'.join(mini+maxi)

def dating_range(age):
    if age <= 14:
        min_ = age - 0.10 * age
        max_ = age + 0.10 * age
        return "{}-{}".format(int(min_),int(max_))
    if age > 14:
        min_ = (age/2)+7
        max_ = (age-7)*2
        return "{}-{}".format(int(min_),int(max_))

def dating_range(age):
    return f'''{int(age/2+7)}-{int(age*2-7*2)}''' if age>14 else f'''{int(0.9*age)}-{int(1.1*age)}'''

def dating_range(age):
    if age <= 14:
        return f"{int(age - 0.10 * age)}-{int(age + 0.10 * age)}"
    return f"{int(age/2 +7)}-{int((age-7)*2)}"

import math

def dating_range(age):

    if age > 14:
        min = math.floor(age/2 + 7)
        max = (age-7) * 2     
        return '{}-{}'.format(min, max)
    else: 
        min = math.floor(age - 0.10 * age)
        max = math.floor(age + 0.10 * age)
        return '{}-{}'.format(min, max)


from math import floor
def dating_range(age):
    if age <= 14:
        min = floor(age - 0.1 * age)
        max = floor(age + 0.1 * age)
    else:
        min = floor(age / 2 + 7)
        max = floor((age - 7) * 2)
    return '{0}-{1}'.format(min, max)

from math import floor
def dating_range(age):
    if age>14:
        min=(age/2)+7
        max=(age-7)*2
        return "{}-{}".format(floor(min),floor(max))
    elif age<=14:
        min=age-0.10*age
        max=age+0.10*age
        return "{}-{}".format(floor(min),floor(max))
    #return min-max


def dating_range(age):
    return f"{int(age-0.10 * age)}-{int(age+0.10*age)}" if age < 14 else f"{int(age / 2 + 7)}-{int((age-7)*2)}"

def dating_range(age):
    if age > 14:
        min = (age//2)+7
        max = (age-7)*2
        return f"{min}-{max}"
    else:
        min = int(age - 0.10*age)
        max = int(age + 0.10*age)
        return f"{min}-{max}"

def dating_range(age):
    return f'{age//2 + 7}-{(age-7)*2}' if age > 14 else f'{int(age-0.1*age)}-{int(age+0.1*age)}'

def dating_range(age):
    if age <= 14:
        min1 = age - .10 * age
        max1 = age + .10 * age
        min2 = int(min1)
        max2 = int(max1)
        return str(min2) + "-" + str(max2)
    if age > 14:
        min = age // 2 + 7
        max = (age - 7) * 2
        return str(min) + "-" + str(max)

def dating_range(age):
    r = (age - 0.10 * age, age + 0.10 * age)
    if age > 14:
        r = (age / 2 + 7, (age - 7) * 2)
    return "{}-{}".format(int(r[0]), int(r[1]))


from math import floor
def dating_range(age):
    if age > 14:
        min = age/2 + 7 
        max = (age -7)*2
    else:
        min = floor(age - 0.10*age)
        max = floor(age + 0.10*age)
    return str(floor(min)) + '-' + str(floor(max))