Created
February 17, 2024 10:52
-
-
Save AlbertVeli/4058336e505c0263e1daed64b24cc9ea to your computer and use it in GitHub Desktop.
Åldersfördelning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (män, kvinnor), 5-årsintervaller, källa: | |
# https://www.scb.se/hitta-statistik/sverige-i-siffror/manniskorna-i-sverige/befolkningspyramid-for-sverige/ | |
a = [(296183, 280184), (319820, 301335), (325003, 306568), (310539, 292308), (310354, 275136), (342974, 323678), (400939, 379866), (357035, 337476), (331475, 316375), (332100, 320776), (334354, 326130), (344012, 334707), (288783, 286309), (268962, 273778), (255190, 269193), (238376, 259291), (140775, 167556), (69776, 102177), (25990, 52397), (5259, 15730), (425, 2262)] | |
totalt = sum(map(sum, a)) | |
# 6 första intervallerna är 0-4, 5-9, 10-14, 15-19, 20-24, 25-29 | |
under_tretti = sum(map(sum, a[:6])) | |
print(100 * under_tretti / totalt) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment