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
```

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Starter code: def dating_range(age):
	

Solutions:
def dating_range(age):
	if age <= 14:
		min = age - 0.1 * age
		max = age + 0.1 * 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' % (0.9 * age, 1.1 * age)
	else:
		return '%d-%d' % (age / 2 + 7, (age - 7) * 2)


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


def dating_range(age):
	return ['%d-%d' % (age - 0.1 * age, age + 0.1 * 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)}'


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:
		a = age / 2 + 7
		b = (age - 7) * 2
	else:
		a = age - 0.1 * age
		b = age + 0.1 * age
	return f'{int(a)}-{int(b)}'


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


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}'


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])))


from math import floor

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


dating_range = lambda x: '%s-%s' % (str(int(x - 0.1 * x)), str(int(x + 0.1 * 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.1 * age)) + '-' + str(int(age + 0.1 * 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 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.1 * age))
	max_age = str(int(age + 0.1 * 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:
		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.1 * age)
	max_under = int(age + 0.1 * age)
	return f'{min_over}-{max_over}' if age > 14 else f'{min_under}-{max_under}'


def dating_range(age):
	if age >= 15:
		min_age = int(age / 2 + 7)
		max_age = (age - 7) * 2
	else:
		min_age = int(age - 0.1 * age)
		max_age = int(age + 0.1 * 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 > 12:
		return str(int(age / 2 + 7)) + '-' + str(int((age - 7) * 2))
	else:
		return str(int(age - 0.1 * age)) + '-' + str(int(age + 0.1 * age))


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.1 * age)}-{int(age + 0.1 * age)}'


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.1 * age))}-{int(np.floor(age + 0.1 * 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 * 0.5 + 7 if age > 14 else age * 0.9)
	max_age = floor(age * 2 - 14 if age > 14 else age * 1.1)
	return '{}-{}'.format(min_age, max_age)


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):
	import math
	if age <= 14:
		return f'{math.floor(age - 0.1 * age)}-{math.floor(age + 0.1 * age)}'
	else:
		return f'{math.floor(age / 2 + 7)}-{math.floor(2 * (age - 7))}'


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))


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)}'


import math

def dating_range(age):
	if age >= 14:
		max = (age - 7) * 2
		min = age / 2 + 7
	else:
		min = age - 0.1 * age
		max = age + 0.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 / 2 + 7
		max = (age - 7) * 2
	elif age <= 14:
		min = age - 0.1 * age
		max = age + 0.1 * 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)}'


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


from math import floor

def dating_range(age):
	if age <= 14:
		min = floor(age - 0.1 * age)
		max = floor(age + 0.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))


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))


from math import floor

def dating_range(age):
	if age <= 14:
		mini = [str(floor(age - 0.1 * age))]
		maxi = [str(floor(age + 0.1 * 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:
		min1 = age - 0.1 * age
		max1 = age + 0.1 * 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)