Completed 8-14 Cars
This commit is contained in:
parent
00fde385bb
commit
d122224f6e
15
Chapter_08/8-14_cars.py
Normal file
15
Chapter_08/8-14_cars.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Exercise 8-14 Cars
|
||||||
|
# Learning Objective: Make a function that contains a dictionary and allows arbitrary numbers of arguments
|
||||||
|
# with two expected arguments of Manufacturer and Model Name
|
||||||
|
|
||||||
|
|
||||||
|
def make_car(make, model, **car_info):
|
||||||
|
car_info['Manufacturer'] = make
|
||||||
|
car_info['Model'] = model
|
||||||
|
return car_info
|
||||||
|
|
||||||
|
my_car = make_car('nissan', 'z', color='red', transmission='manual', rubber_floor_mats=True)
|
||||||
|
|
||||||
|
print(my_car)
|
||||||
|
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user