2 1 class CarRecord: def _init__(self): self.year_made = 0 self.car_vin = # FIXME add _str_() 3 4 5 6 7 8 9 Your solution goes here 10 my car = CarRecord () 11 my car.year_made = int(input()) 12 my car.car_vin = input() 13 14 print (my_car) ITT

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter9: Using Classes And Objects
Section: Chapter Questions
Problem 9E
icon
Related questions
Question

Write the special method __str__() for CarRecord.

Sample output with input: 2009 'ABC321'Year: 2009, VIN: ABC321

2
1 class CarRecord:
def _init__(self):
self.year_made = 0
self.car_vin =
# FIXME add _str_()
3
4
5
6
7
8
9
Your solution goes here
10 my car = CarRecord ()
11 my car.year_made = int(input())
12 my car.car_vin = input()
13
14 print (my_car)
ITT
Transcribed Image Text:2 1 class CarRecord: def _init__(self): self.year_made = 0 self.car_vin = # FIXME add _str_() 3 4 5 6 7 8 9 Your solution goes here 10 my car = CarRecord () 11 my car.year_made = int(input()) 12 my car.car_vin = input() 13 14 print (my_car) ITT
AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
steps

Unlock instant AI solutions

Tap the button
to generate a solution

Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,