Python Forum
Determining the Percentage of Voter Population
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Determining the Percentage of Voter Population
#3
Hi I am still not clear what you mean by "the County class gives the definition how to create one county object"? Can you elaborate? Because the assignment starts off with this code:

# implement County class here
    
def highest_turnout(data) :

  # implement the function here

  return # modify this as needed

# your program will be evaluated using these objects 
# it is okay to change/remove these lines but your program
# will be evaluated using these as inputs
allegheny = County("allegheny", 1000490, 645469)
philadelphia = County("philadelphia", 1134081, 539069)
montgomery = County("montgomery", 568952, 399591)
lancaster = County("lancaster", 345367, 230278)
delaware = County("delaware", 414031, 284538)
chester = County("chester", 319919, 230823)
bucks = County("bucks", 444149, 319816)
data = [allegheny, philadelphia, montgomery, lancaster, delaware, chester, bucks]  

result = highest_turnout(data) # do not change this line!
print(result) # prints the output of the function
# do not remove this line!
Reply


Messages In This Thread
RE: Determining the Percentage of Voter Population - by Than999 - Dec-28-2019, 06:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Linked List - Ordering by largest population with country name. PaleHorse 2 3,038 Jun-16-2020, 09:04 PM
Last Post: jefsummers
  finding percentage in a list. samh625 3 5,716 Jun-15-2020, 06:49 PM
Last Post: samh625
  Numerically determining the highest a ball travels when shot straight up JakeWitten 3 3,490 Apr-22-2017, 04:37 PM
Last Post: Ofnuts

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020