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

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
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
entry level cyber
* Home
Content
zy Section 2.15 - CYE X
O ITS128 Fall 2020
G 2.14 LAB: Exceptic x
b Answered: Define x
[Solved] Define t x
+
i learn.zybooks.com/zybook/CYB_135_54915392/chapter/2/section/15
Q
= zyBooks My library > CYB/135: Object-Oriented Security Scripting home > 2.15: LAB: Artwork label (modules)
E zyBooks catalog
? Help/FAQ
Kenneth Schultz -
year_ti caLcu//
25
26
27
28
29 if
_main_":
user_artist_name = input()
user_birth_year = int(input())
user_death_year = int(input())
user_title = input()
user_year_created = int(input ())
name
==
30
31
32
33
34
35
36
user_artist = Artist(user_artist_name, user_birth_year, user_death_year)
37
38
new_artwork = Artwork(user_title, user_year_created, user_artist)
39
40
new_artwork.print_info()
When done developing your program, press the Submit for grading button below. This will
submit your program for auto-grading.
Develop mode
Submit mode
Submit for grading
Signature of your work
What is this?
9/16.. R-- |0-|1-|0-------|0|0|0|0|0|0|0|0|0|0 F---------|0--|2 ..9/17
Latest submission - 1:43 AM CDT on 09/17/21
Total score: 2 / 10
Only show failing tests
Download this submission
1: Compare output a
1/1
Pablo Picasso
1881
Input
1973
Three Musicians
1:45 AM
O Type here to search
77°F Cloudy
9/17/2021
Transcribed Image Text:entry level cyber * Home Content zy Section 2.15 - CYE X O ITS128 Fall 2020 G 2.14 LAB: Exceptic x b Answered: Define x [Solved] Define t x + i learn.zybooks.com/zybook/CYB_135_54915392/chapter/2/section/15 Q = zyBooks My library > CYB/135: Object-Oriented Security Scripting home > 2.15: LAB: Artwork label (modules) E zyBooks catalog ? Help/FAQ Kenneth Schultz - year_ti caLcu// 25 26 27 28 29 if _main_": user_artist_name = input() user_birth_year = int(input()) user_death_year = int(input()) user_title = input() user_year_created = int(input ()) name == 30 31 32 33 34 35 36 user_artist = Artist(user_artist_name, user_birth_year, user_death_year) 37 38 new_artwork = Artwork(user_title, user_year_created, user_artist) 39 40 new_artwork.print_info() When done developing your program, press the Submit for grading button below. This will submit your program for auto-grading. Develop mode Submit mode Submit for grading Signature of your work What is this? 9/16.. R-- |0-|1-|0-------|0|0|0|0|0|0|0|0|0|0 F---------|0--|2 ..9/17 Latest submission - 1:43 AM CDT on 09/17/21 Total score: 2 / 10 Only show failing tests Download this submission 1: Compare output a 1/1 Pablo Picasso 1881 Input 1973 Three Musicians 1:45 AM O Type here to search 77°F Cloudy 9/17/2021
entry level cyber
* Home
Content
zy Section 2.15 - CYE X
O ITS128 Fall 2020
G 2.14 LAB: Exceptic x
b Answered: Define x
[Solved] Define ti x
+
i learn.zybooks.com/zybook/CYB_135_54915392/chapter/2/section/15
Q
= zyBooks My library > CYB/135: Object-Oriented Security Scripting home > 2.15: LAB: Artwork label (modules)
B zyBooks catalog
? Help/FAQ
Kenneth Schultz -
Title: Distant Muses, 2000
346682.2019644.gx3zgy7
LAB
2.15.1: LAB: Artwork label (modules)
2/10
ACTIVITY
Current file: main.py -
Load default template..
2
3 class Artist:
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.death_year == -1:
print ('Artist: {}, born {}'.format (self.name, self.birth_year))
6
7
8
10
11
12
else:
13
print('Artist: {} ({}-{})'.format(self.name, self.birth_year, self.death_year))
14
15 class Artwork:
16
_init_(self, title="None", year_created=0, artist=Artist()):
self.title
17
def
18
title
When done developing your program, press the Submit for grading button below. This will
submit your program for auto-grading.
Develop mode
Submit mode
Submit for grading
Signature of your work
What is this?
9/16.. R-- |0-|1-|0------
| 0|0 |0|0|0 이 | 0 |0|0|0 F-
- |0--|2 ..9/17
1:45 AM
O Type here to search
77°F Cloudy
9/17/2021
Transcribed Image Text:entry level cyber * Home Content zy Section 2.15 - CYE X O ITS128 Fall 2020 G 2.14 LAB: Exceptic x b Answered: Define x [Solved] Define ti x + i learn.zybooks.com/zybook/CYB_135_54915392/chapter/2/section/15 Q = zyBooks My library > CYB/135: Object-Oriented Security Scripting home > 2.15: LAB: Artwork label (modules) B zyBooks catalog ? Help/FAQ Kenneth Schultz - Title: Distant Muses, 2000 346682.2019644.gx3zgy7 LAB 2.15.1: LAB: Artwork label (modules) 2/10 ACTIVITY Current file: main.py - Load default template.. 2 3 class Artist: 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.death_year == -1: print ('Artist: {}, born {}'.format (self.name, self.birth_year)) 6 7 8 10 11 12 else: 13 print('Artist: {} ({}-{})'.format(self.name, self.birth_year, self.death_year)) 14 15 class Artwork: 16 _init_(self, title="None", year_created=0, artist=Artist()): self.title 17 def 18 title When done developing your program, press the Submit for grading button below. This will submit your program for auto-grading. Develop mode Submit mode Submit for grading Signature of your work What is this? 9/16.. R-- |0-|1-|0------ | 0|0 |0|0|0 이 | 0 |0|0|0 F- - |0--|2 ..9/17 1:45 AM O Type here to search 77°F Cloudy 9/17/2021
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 3 images

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY