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 "None" and the years of birth and death to 0. 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 "None", the year created to 0, 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-1973) Title: Three Musicians, 1921 If the input is: Brice Marden 1938 -1 Distant Muses 2000 the output is: Artist: Brice Marden, born 1938 Title: Distant Muses, 2000

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

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 "None" and the years of birth and death to 0.

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 "None", the year created to 0, 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-1973) Title: Three Musicians, 1921

If the input is:

Brice Marden 1938 -1 Distant Muses 2000

the output is:

Artist: Brice Marden, born 1938 Title: Distant Muses, 2000
G entry level
* Home
Content
zy Section 2.15 ×
(229) ITS12 X
G 2.14 LAB: E X
b Answered:
* (Solved] In
FSA Contact Us
M Inbox (7,71 ×
+
i learn.zybooks.com/zybook/CYB_135_54915392/chapter/2/section/15
= zyBooks My library > CYB/135: Object-Oriented Security Scripting home > 2.15: LAB: Artwork label (modules)
E zyBooks catalog
? Help/FAQ
Kenneth Schultz -
the output is:
Artist: Brice Marden, born 1938
Title: Distant Muses, 2000
346682.2019644.gx3zgy7
LAB
2.15.1: LAB: Artwork label (modules)
0/ 10
АCTIVITY
Current file: main.py -
Load default template..
1 # TODO: Import Artist from Artist.py and Artwork from Artwork.py
3 if
main
":
name
user_artist_name = input()
user_birth_year = int(input())
user_death_year = int(input())
user_title = input()
user_year_created = int(input())
4
7
8
user_artist = Artist(user_artist_name, user_birth_year, user_death_year)
10
11
12
new_artwork = Artwork(user_title, user_year_created, user_artist)
13
14
new_artwork.print_info()|
Run your program as often as you'd like, before submitting for grading. Below, type any needed
input values in the first box, then click Run program and observe the program's output in the
second box.
Develop mode
Submit mode
Enter program input (optional)
If your code requires input values, provide them here.
6:44 AM
O Type here to search
75°F Rain to stop
9/16/2021
Transcribed Image Text:G entry level * Home Content zy Section 2.15 × (229) ITS12 X G 2.14 LAB: E X b Answered: * (Solved] In FSA Contact Us M Inbox (7,71 × + i learn.zybooks.com/zybook/CYB_135_54915392/chapter/2/section/15 = zyBooks My library > CYB/135: Object-Oriented Security Scripting home > 2.15: LAB: Artwork label (modules) E zyBooks catalog ? Help/FAQ Kenneth Schultz - the output is: Artist: Brice Marden, born 1938 Title: Distant Muses, 2000 346682.2019644.gx3zgy7 LAB 2.15.1: LAB: Artwork label (modules) 0/ 10 АCTIVITY Current file: main.py - Load default template.. 1 # TODO: Import Artist from Artist.py and Artwork from Artwork.py 3 if main ": name user_artist_name = input() user_birth_year = int(input()) user_death_year = int(input()) user_title = input() user_year_created = int(input()) 4 7 8 user_artist = Artist(user_artist_name, user_birth_year, user_death_year) 10 11 12 new_artwork = Artwork(user_title, user_year_created, user_artist) 13 14 new_artwork.print_info()| Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box. Develop mode Submit mode Enter program input (optional) If your code requires input values, provide them here. 6:44 AM O Type here to search 75°F Rain to stop 9/16/2021
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
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