# # ps7pr4.py - Problem Set 7, Problem 4 # # Creating a simple database program using file processing # def output_formatted(year, rank, population): """ takes in field values for the year, rank and population of a given city and prints them with the appropriate formatting """ pop = int(float(population) * 1000) print(year + ' ' + format(rank, '2s') + format(pop, '14,d'))