Complete the code to iterate through the keys and values of the car_prices dictionary, printing out some information about each one.
def car_listing(car_prices):
result = ""
for car in name,car_listing:
result += "{} costs {} dollars".format(cars,car_prices[cars]) + "\n"
return result
print(car_listing({"Kia Soul":19000, "Lamborghini Diablo":55000, "Ford Fiesta":13000, "Toyota Prius":24000}))
below said it is wrong that i don't knowRuntimeErrorElement(RuntimeError,Error on line 7:
print(car_listing({"Kia Soul":19000, "Lamborghini Diablo":55000, "Ford Fiesta":13000, "Toyota Prius":24000})))
RuntimeErrorElement(RuntimeError,Error on line 4:
result += "{} costs {} dollars".format(name,price) + "\n"
NameError: name 'price' is not defined
Answers
Answered by
4
Answer:
Anshu to all of the best to all of the best to all of the best to all of the best to all of the best
Similar questions
Math,
4 months ago
Social Sciences,
4 months ago
Hindi,
8 months ago
Math,
8 months ago
English,
1 year ago
Chinese,
1 year ago
India Languages,
1 year ago