title: Can't get python class initialized correctly
body: <p>I'm not sure why this isn't working. The error says my Artist object has no attribute called name. This doesn't make sense to me because I'm looking right at the attribute called name....</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>
  <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>Ex: If the input is:</p>
  <pre><code>Pablo Picasso
  1881
  1973
  Three Musicians
  1921
  </code></pre>
  <p>the output is:</p>
  <pre><code>Artist: Pablo Picasso (1881-1973)
  Title: Three Musicians, 1921
  </code></pre>
  <p>If the input is:</p>
  <pre><code>Brice Marden
  1938
  -1
  Distant Muses 
  2000
  </code></pre>
  <p>the output is:</p>
  <pre><code>Artist: Brice Marden, born 1938
  Title: Distant Muses, 2000
  </code></pre>
  <p>My code:</p>
  <pre><code>class Artist:
      def __init__(self, name= &quot;None&quot;, birth_year = 0, death_year = 0):
          name = self.name
          birth_year = self.birth_year
          death_year = self.death_year
      # TODO: Define constructor with parameters to initialize instance attributes
      #       (name, birth_year, death_year)
      def print_info(self):
          if self.death_year == -1:
              print(&quot;{}, born {}&quot;.format(self.name,self.birth_year))
          else:
              print(&quot;{} ({}-{})&quot;.format(self.name,self,birth_year,self.death_year))
      # TODO: Define print_info() method. If death_year is -1, only print birth_year
  
        
  class Artwork:
      def __init__(self,title =&quot;None&quot;,year_created = 0, artist=Artist().name):
          title = self.title
          year_created = self.year_created
          artist = self.artist
      
      # TODO: Define constructor with parameters to initialize instance attributes
      #       (title, year_created, artist)
      def print_info(self):
          print(&quot;Artist: {}, born {}&quot;.format(self.artist,Artist().birth_year))
          print(&quot;Title: {}, {}&quot;.format(self.title,self.year_created))
          
      # TODO: Define print_info() method
  
  
  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)
  
      new_artwork = Artwork(user_title, user_year_created, user_artist)
    
      new_artwork.print_info()
  </code></pre>
  <p>Enter program input (optional)</p>
  <pre><code>Pablo Picasso
  1881
  1973
  Three Musicians
  1921
  </code></pre>
  <p>Program errors displayed here</p>
  <pre><code>Traceback (most recent call last):
    File &quot;main.py&quot;, line 16, in &lt;module&gt;
      class Artwork:
    File &quot;main.py&quot;, line 17, in Artwork
      def __init__(self,title =&quot;None&quot;,year_created = 0, artist=Artist().name):
    File &quot;main.py&quot;, line 3, in __init__
      name = self.name
  AttributeError: 'Artist' object has no attribute 'name'
  </code></pre>