title: How to correctly initialize a class
body: <p>For my python assignment, I have to create classes and initialize them. I created them correctly but the automatic grader says they are not correctly initialized.</p>
  <blockquote>
  <p>Define the Artist class with a constructor to initialize an artist's information and a print_info() method. The constructor should by default initialize the artist's name to &quot;None&quot; and the years of birth and death to 0. print_info() should display Artist Name, born XXXX if the year of death is -1 or Artist Name (XXXX-YYYY) otherwise.</p>
  </blockquote>
  <blockquote>
  <p>Define the Artwork class with a constructor to initialize an artwork's information and a print_info() method. The constructor should by default initialize the title to &quot;None&quot;, the year created to 0, and the artist to use the Artist default constructor parameter values.</p>
  </blockquote>
  <p>What I have so far:</p>
  <pre><code>class Artist:
     def __init__(self, user_artist_name=&quot;None&quot;, user_birth_year=0, user_death_year=0):
         self.name = user_artist_name
         self.birth = user_birth_year
         self.death = user_death_year
  
     def print_info(self):
         if self.death == -1:
             print(&quot;Artist: {}, born {}&quot;.format(self.name, self.birth))
         else:
             print(&quot;Artist: {} ({}-{})&quot;.format(self.name, self.birth, self.death))
  
  
  class Artwork:
     def __init__(self, user_title= &quot;None&quot;, year_created=0, user_artist=Artist()):
         self.title = user_title
         self.year = year_created
         self.artist = user_artist
  
     def print_info(self):
         print(&quot;Title: {}, {}&quot;.format(self.title, self.year))
  
  
  if __name__ == &quot;__main__&quot;:
     user_artist_name = input()
     user_birth_year = int(input())
     user_death_year = int(input())
     user_title = input()
     user_year_created = int(input())
  
     user_artist = Artist(user_artist_name, user_birth_year, user_death_year)
     
     user_artist.print_info()
  
     new_artwork = Artwork(user_title, user_year_created, user_artist)
  
     new_artwork.print_info()
  </code></pre>
  <p>Artist('Pablo Picasso', 1881, 1973) fails to correctly initialize artist. and the constructor for both default parameters of Artist and Artwork fail.</p>
  <p>What am I missing?</p>