Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

These are my codes and I would like them to have results like following: I think I am missing some codes but not sure


These are my codes and I would like them to have results like following:   

I think I am missing some codes but not sure what I am missing. Can you help me out?  

from lee_jieun_my_population_groups import PopulationGroup def main(): # do build_population_group_list population = build_population_group_list() # do calculate_column_totals male_total, female_total, category calculate_column_totals(population) pop_group PopulationGroup(male_total, female_total, category) #sorts the population groups by age group population.sort(key= by_category) print() #print reaport heading print('{0:^50}'.format('Counts by Age Group')) print(' {0: 10}{2:>10}{3:>10}{4:>10}'.format('Age Group', 'Males', 'Females', 'Total', 'Percent')) # do print_report report print_report #sorts the population groups by total_count descending population.sort(key = by_total, reverse = True) print() # print reaport heading T print('{0:^50}'.format('Counts by + title)) print(' {0: 10}{2:>10}{3:>10}{4:>10}'.format('Age Group', 'Males', 'Females', 'Total', 'Percent')) # do print_report report print_report # sorts population groups by male_count descending population.sort(key = by_males, reverse True) = print() #print reaport heading print('{0:^50}'.format('Counts by + title)) print(' {0: 10}{2:>10}{3:>10}{4:>10}'.format('Age Group', 'Males', 'Females', 'Total', 'Percent')) # do print_report report print_report # sort population groups by female_count descending population.sort(key = by_females, reverse = True) print() #print reaport heading 1 print('{0:^50}'.format('Counts by + title)) print(' {0: 10}{2:>10}{3:>10}{4:>10}'.format('Age Group', 'Males', 'Females', 'Total', 'Percent')) # do print_report report print_report

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Applying Communication Theory For Professional Life A Practical Introduction

Authors: Marianne Dainton, Elaine D. Zelley

4th Edition

150631547X, 978-1506315478

More Books

Students also viewed these Programming questions

Question

1. Check readers and library books. Is there ethnic diversity?

Answered: 1 week ago

Question

=+b. What is the probability that at most three forms are required?

Answered: 1 week ago