File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,16 +5,21 @@ def age_band_5_years(age: int)->str:
55 """
66 Place age into appropriate 5 year band
77
8- This function takes the age supplied as an argument and returns a string representing the relevant 5 year banding.
8+ This function takes the age supplied as an argument and returns a string
9+ representing the relevant 5 year banding.
910
10- Args:
11- age: int
12- Age of the person
11+ Parameters
12+ ----------
13+ age : int
14+ Age of the person
1315
14- Returns:
15- str
16- The 5 year age band
16+ Returns
17+ -------
18+ out : str
19+ The 5 year age band
1720
21+ Examples
22+ --------
1823 >>> age_band_5_years(3)
1924 '0-4'
2025 >>> age_band_5_years(-1)
@@ -36,25 +41,30 @@ def age_band_5_years(age: int)->str:
3641
3742def age_band_10_years (age : int )-> str :
3843 """
39- Place age into appropriate 10 year band
40-
41- This function takes the age supplied as an argument and returns a string representing the relevant 10 year banding.
42-
43- Args:
44- age: int
45- Age of the person
46-
47- Returns:
48- str
49- The 10 year age band
50-
51- >>> age_band_10_years(3)
52- '0-9'
53- >>> age_band_10_years(-1)
54- 'Age not known'
55- >>> age_band_10_years(95)
56- '90 and over'
57- """
44+ Place age into appropriate 10 year band
45+
46+ This function takes the age supplied as an argument and returns a string
47+ representing the relevant 10 year banding.
48+
49+ Parameters
50+ ----------
51+ age : int
52+ Age of the person
53+
54+ Returns
55+ -------
56+ out : str
57+ The 10 year age band
58+
59+ Examples
60+ --------
61+ >>> age_band_10_years(3)
62+ '0-9'
63+ >>> age_band_10_years(-1)
64+ 'Age not known'
65+ >>> age_band_10_years(95)
66+ '90 and over'
67+ """
5868
5969 if age is None or age < 0 :
6070 return 'Age not known'
You can’t perform that action at this time.
0 commit comments