Every day we can send from the server a certain limit of e-mails.

Task:
Write a function that will return the integer number of e-mails sent in the percentage of the limit.

Example:
```
limit       - 1000;
emails sent - 101;
return      - 10%; // becouse integer from 10,1 = 10
```

Arguments:

Integer, limit;
Integer, number of e-mails sent today;

When:

the argument ```$sent = 0```, then return the message: "No e-mails sent";
the argument ```$sent >= $limit```, then return the message: "Daily limit is reached";
the argument ```$limit is empty```, then default ```$limit = 1000``` emails;

Good luck!

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Mathematics

Starter code: def get_percentage(sent, limit=1000):
	

Solutions:
def get_percentage(sent, limit=1000):
	if not sent:
		return 'No e-mails sent'
	elif sent >= limit:
		return 'Daily limit is reached'
	return '{}%'.format(int(sent * 100 / limit))


def get_percentage(a, b=1000):
	return 'No e-mails sent' if not a else 'Daily limit is reached' if a >= b else f'{int(a / b * 100)}%'


def get_percentage(sent, limit=1000):
	return f'{100 * sent // limit}%' if 0 < sent < limit else 'Daily limit is reached' if sent else 'No e-mails sent'


from operator import truediv

def get_percentage(sent, limit=1000):
	if not sent:
		return 'No e-mails sent'
	elif sent >= limit:
		return 'Daily limit is reached'
	return '{}%'.format(int(truediv(sent, limit) * 100))


def get_percentage(sent, limit=1000):
	return 'No e-mails sent' if not sent else '%d%%' % (100 * sent // limit) if sent < limit else 'Daily limit is reached'


get_percentage = lambda s, l=1000: 'No e-mails sent' * (s < 1) or '%d%%' % (100 * s // l) * (s < l) or 'Daily limit is reached'


def get_percentage(sent, limit=1000):
	if sent == 0:
		return 'No e-mails sent'
	elif sent >= limit:
		return 'Daily limit is reached'
	else:
		return str(int(float(sent) / float(limit) * 100)) + '%'


def get_percentage(sent, limit=1000):
	if sent == 0:
		return 'No e-mails sent'
	if sent >= limit:
		return 'Daily limit is reached'
	return '%d%%' % int(sent / limit * 100)