Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Real World data
- Estimated average age of young people leaving the parental household by sex
- """
- print("Hello I'm gigi your bot. Lets deal with maximums on real world problem lists")
- countries=["Belgium","Bulgaria","Czechia", "Denmark", "Germany","Estonia", "Ireland","Greece", "spain", "France","Croatia"]
- males=[24.1,31.1,27.7,21.3,24.4,23.4,27.1,30.7,30.3,25.0, 33.4]
- females=[22.8,26.5,25.1,20.8,22.9,22.9,25.6,28.0,28.3,23.1,30.4]
- """ this function will find the averaged min age for moving out from home and return the country
- """
- def countries_millenials_movingout_min_age(list_of_age):
- min=list_of_age[0]
- for i in range(len(list_of_age)):
- if list_of_age[i]<min:
- min=list_of_age[i]
- index=list_of_age.index(min)
- return min,countries[index]
- female_age,fromWhere=countries_millenials_movingout_min_age(females)
- print("The youngest female moved at age of {} from {}".format(female_age,fromWhere))
- male_age,fromWhere2=countries_millenials_movingout_min_age(males)
- print("The youngest male moved at age of {} from {}".format(male_age,fromWhere2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement