-
Notifications
You must be signed in to change notification settings - Fork 5
/
math.py
53 lines (44 loc) · 1.28 KB
/
math.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
__author__ = "John Doe"
# For purposes of practicing do not import math.
# Assume pi = 3.14
def even_or_odd(number):
"""
Given a number, return if it is even or odd.
"""
pass
def sum_them_all(number):
"""
Given a number, return the sum of all digits from
zero to the number (inclusive).
"""
pass
def how_many_days(days):
"""
Given a certain amount of days, return a string
in the format: 'x year(s) y month(s) and z day(s).
For the purposes of this exercise, assume a year has
360 days and a month has 30 days.
"""
pass
def whats_the_price(diameter, price):
"""
Given the diameter and price of a pizza,
return the cost per square inch of it.
"""
pass
def how_much_on_taxes(price, total):
"""
Given the price of a product and the total
on the receipt, return the exact percentage
paid in taxes, with two decimals.
"""
pass
def calories_per_day(current, goal, max_per_day):
"""
Given current weith (kg), goal weight (kg), and
the maximum intake of calories per day (g).
Find the amount of days this person will need to
reach their goal.
Hint: check if goal < current and vice versa.
"""
pass