businesses = { "Shoemakers" => 50, "Butchers" => 1200, "Furriers" => 250, "Fishmongers" => 1200, "Maidservants" => 250, "Beer-Sellers" => 1400, "Tailors" => 250, "Buckle Makers" => 1400, "Barbers" => 350, "Plasterers" => 1400, "Jewelers" => 400, "Spice Merchants" => 1400, "Taverns/Restaurants" => 400, "Blacksmiths" => 1500, "Old-Clothes" => 400, "Painters" => 1500, "Pastrycooks" => 500, "Doctors (Licensed)" => 1700, "Masons" => 500, "Roofers" => 1800, "Carpenters" => 550, "Locksmiths" => 1900,"Weavers" => 600, "Bathers" => 1900, "Chandlers" => 700, "Ropemakers" => 1900, "Mercers" => 700, "Inns" => 2000, "Coopers" => 700, "Tanners" => 2000, "Bakers" => 800, "Copyists" => 2000, "Watercarriers" => 850, "Sculptors" => 2000, "Scabbardmakers" => 850, "Rugmakers" => 2000, "Wine-Sellers" => 900, "Harness-Makers" => 2000, "Hatmakers" => 950, "Bleachers" => 2100, "Saddlers" => 1000, "Hay Merchants" => 2300, "Chicken Butchers" => 1000, "Cutlers" => 2300, "Pursemakers" => 1100, "Glovemakers" => 2400, "Woodsellers" => 2400, "Woodcarvers" => 2400, "Magic-Shops" => 2800, "Booksellers" => 6300, "Bookbinders" => 3000, "Illuminators" => 3900, "Doctors (Total)" => 350 } spoink = businesses.keys.sort File.open("NANDESUTOOOOOOO.txt", "a") do |file| spoink.each {|x| file.puts("#{x} #{businesses[x]}\n") } end