Start på pass 2
This commit is contained in:
11
Pass2/struct.py
Executable file
11
Pass2/struct.py
Executable file
@@ -0,0 +1,11 @@
|
||||
class Car:
|
||||
pass
|
||||
|
||||
myCar = Car() # Create an empty employee record
|
||||
|
||||
# Fill the fields of the record
|
||||
myCar.model = 'V 70'
|
||||
myCar.brand = 'Volvo'
|
||||
myCar.year = 2005
|
||||
|
||||
print(myCar.model)
|
||||
Reference in New Issue
Block a user