May I please have your assistance with this lab: 2.15 LAB: Artwork label ( modules) Part of the code is correct. I am only needing the code to be correct for the following errors: This is the current code & errors at bottom of code: # Artist.py class Artist: # below is the comstructor to initializez artist infomration # constructor initialize the artist's name to "None" and the years of birth and death to 0 def __init__(self, name='None', birth_year=0, death_year=0): self.name = name self.birth_year = birth_year self.death_year = death_year def print_info(self): if self.birth_year >= 0 and self.death_year >= 0: print(f'Artist: {self.name} ({self.birth_year} to {self.death_year})') elif self.birth_year >= 0: print(f'Artist: {self.name} ({self.birth_year} - present)') else: print(f'Artist: {self.name} (unkown)') # Artwork.py class Artwork: def __init__(self, title= "None", year_created=0, artist=Artist()): self.title = title self.year_created = year_created self.artist = artist def print_info(self): self.artist.print_info() print(f'Title: {self.title}, {self.year_created}') # Main.py if __name__ == "__main__": 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() Current Errors: 4:Unit testkeyboard_arrow_up 0 / 2 Tests Artist constructor with default param values AttributeError: 'Artist' object has no attribute 'name' 5:Unit testkeyboard_arrow_up 0 / 2 Tests that Artist('Pablo Picasso', 1881, 1973) correctly initializes artist TypeError: Artist() takes no arguments 6:Unit testkeyboard_arrow_up 0 / 2 Tests that Artist('Brice Marden', 1938, -1) correctly initializes artist TypeError: Artist() takes no arguments 7:Unit testkeyboard_arrow_up 0 / 1 Tests Artwork constructor with default param values AttributeError: 'Artwork' object has no attribute 'title' Please see attached lab and error messages. Thank you.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
May I please have your assistance with this lab: 2.15 LAB: Artwork label ( modules) Part of the code is correct. I am only needing the code to be correct for the following errors: This is the current code & errors at bottom of code: # Artist.py class Artist: # below is the comstructor to initializez artist infomration # constructor initialize the artist's name to "None" and the years of birth and death to 0 def __init__(self, name='None', birth_year=0, death_year=0): self.name = name self.birth_year = birth_year self.death_year = death_year def print_info(self): if self.birth_year >= 0 and self.death_year >= 0: print(f'Artist: {self.name} ({self.birth_year} to {self.death_year})') elif self.birth_year >= 0: print(f'Artist: {self.name} ({self.birth_year} - present)') else: print(f'Artist: {self.name} (unkown)') # Artwork.py class Artwork: def __init__(self, title= "None", year_created=0, artist=Artist()): self.title = title self.year_created = year_created self.artist = artist def print_info(self): self.artist.print_info() print(f'Title: {self.title}, {self.year_created}') # Main.py if __name__ == "__main__": 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() Current Errors: 4:Unit testkeyboard_arrow_up 0 / 2 Tests Artist constructor with default param values AttributeError: 'Artist' object has no attribute 'name' 5:Unit testkeyboard_arrow_up 0 / 2 Tests that Artist('Pablo Picasso', 1881, 1973) correctly initializes artist TypeError: Artist() takes no arguments 6:Unit testkeyboard_arrow_up 0 / 2 Tests that Artist('Brice Marden', 1938, -1) correctly initializes artist TypeError: Artist() takes no arguments 7:Unit testkeyboard_arrow_up 0 / 1 Tests Artwork constructor with default param values AttributeError: 'Artwork' object has no attribute 'title' Please see attached lab and error messages. Thank you.
d Scripting Language Il home > 215: LAB: Artwork label (modules)
2.15 LAB: Artwork label (modules)
Define the Artist class in Artist.py with a constructor to initialize an artist's information. The constructor should by default initialize the
artist's name to "unknown" and the years of birth and death to -1.
Define the Artwork class in Artwork.py with a constructor to initialize an artwork's information. The constructor should by default initialize
the title to "unknown', the year created to -1, and the artist to use the Artist default constructor parameter values. Add an import
statement to import the Artist class.
Add import statements to main.py to import the Artist and Artwork classes.
Ex: If the input is:
Pablo Picasso
1881
1973
Three Musicians
1921
the output is:
Artist: Pablo Picasso (1881 to 1973)
Title: Three Musicians, 1921
Ex: If the input is:
Brice Marden
1938
-1
Distant Muses
2000
the output is:
Artist: Brice Marden (1938 to present)
Title: Distant Muses, 2000
Ex: If the input is:
Banksy
-1
-1
Balloon Girl
2002
the output is:
Artist: Banksy (unknown)
Title: Balloon Girl, 2002
zyE
Act
Go to
Transcribed Image Text:d Scripting Language Il home > 215: LAB: Artwork label (modules) 2.15 LAB: Artwork label (modules) Define the Artist class in Artist.py with a constructor to initialize an artist's information. The constructor should by default initialize the artist's name to "unknown" and the years of birth and death to -1. Define the Artwork class in Artwork.py with a constructor to initialize an artwork's information. The constructor should by default initialize the title to "unknown', the year created to -1, and the artist to use the Artist default constructor parameter values. Add an import statement to import the Artist class. Add import statements to main.py to import the Artist and Artwork classes. Ex: If the input is: Pablo Picasso 1881 1973 Three Musicians 1921 the output is: Artist: Pablo Picasso (1881 to 1973) Title: Three Musicians, 1921 Ex: If the input is: Brice Marden 1938 -1 Distant Muses 2000 the output is: Artist: Brice Marden (1938 to present) Title: Distant Muses, 2000 Ex: If the input is: Banksy -1 -1 Balloon Girl 2002 the output is: Artist: Banksy (unknown) Title: Balloon Girl, 2002 zyE Act Go to
4:Unit test A
Tests Artist constructor with default param values
AttributeError: 'Artist' object has no attribute 'name'
5:Unit test A
Tests that Artist(Pablo Picasso, 1881, 1973) correctly initializes artist
TypeError: Artist() takes no arguments
6:Unit test A
Tests that Artist(Brice Marden', 1938, -1) correctly initializes artist
TypeError: Artist() takes no arguments
7:Unit test A
Tests Artwork constructor with default param values
AttributeError: 'Artwork' object has no attribute 'title'
5 previous submissions
11:27 AM on 10/24/22
11:19 AM 06 10/24/25
3/10
2/10
View
APL
0/2
0/2
0/2
0/1
Transcribed Image Text:4:Unit test A Tests Artist constructor with default param values AttributeError: 'Artist' object has no attribute 'name' 5:Unit test A Tests that Artist(Pablo Picasso, 1881, 1973) correctly initializes artist TypeError: Artist() takes no arguments 6:Unit test A Tests that Artist(Brice Marden', 1938, -1) correctly initializes artist TypeError: Artist() takes no arguments 7:Unit test A Tests Artwork constructor with default param values AttributeError: 'Artwork' object has no attribute 'title' 5 previous submissions 11:27 AM on 10/24/22 11:19 AM 06 10/24/25 3/10 2/10 View APL 0/2 0/2 0/2 0/1
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Program on Numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education