B: Artwork label (modules) 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:

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

Hello, 

 I am needing help with this lab. The code is correct. I am having trouble with the spacing. Please see the lab

2.15 LAB: Artwork label (modules)

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

Please view current attachments:

The current code that I have, is currently uploaded to make it easier. As I stated before the code is correct, it is just the spacing that I need help with to correct the spacing errors. Please attach a screen shot of the code, like I have done. It helps with spacing and less errors. 

Please review the spacing errors as well. 

Thank you for all of your help. 

 

2:Compare output
Output differs. See highlights below. Special character legend
Input
Your output
Expected output
3:Compare output A
Input
Your output
4 Unit test A
Expected output
Brice Marden
1938
Output differs. See highlights below. Special character legend
Distant Muses
2000
Artist: Brice Marden, 1938
Title: Distant Muses, 2000
Artist: Brice Marden (1938) present)
Title: Distant Muses, 2000
Banksy
Balloon Girl
Artist: Banksy, -1
Title: Balloon Girl, 2002
Artist: Banksy (unkown)
Title: Balloon Girl, 2002
Tests Artist constructor with default param values
0/1
0/1
0/2
Transcribed Image Text:2:Compare output Output differs. See highlights below. Special character legend Input Your output Expected output 3:Compare output A Input Your output 4 Unit test A Expected output Brice Marden 1938 Output differs. See highlights below. Special character legend Distant Muses 2000 Artist: Brice Marden, 1938 Title: Distant Muses, 2000 Artist: Brice Marden (1938) present) Title: Distant Muses, 2000 Banksy Balloon Girl Artist: Banksy, -1 Title: Balloon Girl, 2002 Artist: Banksy (unkown) Title: Balloon Girl, 2002 Tests Artist constructor with default param values 0/1 0/1 0/2
current code.py Xx = Extension: Python
(:> Utenz > 14120 > Cine Live > Desktop > 2cument codepy > Artika > __init__
1
class Artist:
12
4
7
8
9
10
11
12
13
14
15
16
17
GARTENHAM
19
20
23
24
26
28
29
30
def _init__(self, name='None', birth_year=0, death_year=0):
self.name = name
if
self.birth_year
self.death_year
def print_info(self):
else:
print('Artist: ' + self.name, end='!
if self.death_year
-1:
print(", " + str(self.birth_year))
=
print(" (" + str(self.birth_year) + to
class Artwork:
def _init__(self, title= "None", year_created=0, artist=Artist()):
self.title = title
self.year_created
self.artist
name
=
=
def print_info(self):
-
birth_year
death_year
__main__":
=
artist
self.artist.print_info()
print("Title: + self.title + ", " + str(self.year_created))
=
=
user_artist_name
input()
user birth_year int(input())
int(input())
input()
year_created
user_death_year
user title
user_year_created int(input())
+ str(self.death_
new_artwork.print_info()
user_artist Artist (user_artist_name, user_birth_year, user_death_y
new_artwork Artwork(user_title, user_year_created, user_artist)
Transcribed Image Text:current code.py Xx = Extension: Python (:> Utenz > 14120 > Cine Live > Desktop > 2cument codepy > Artika > __init__ 1 class Artist: 12 4 7 8 9 10 11 12 13 14 15 16 17 GARTENHAM 19 20 23 24 26 28 29 30 def _init__(self, name='None', birth_year=0, death_year=0): self.name = name if self.birth_year self.death_year def print_info(self): else: print('Artist: ' + self.name, end='! if self.death_year -1: print(", " + str(self.birth_year)) = print(" (" + str(self.birth_year) + to class Artwork: def _init__(self, title= "None", year_created=0, artist=Artist()): self.title = title self.year_created self.artist name = = def print_info(self): - birth_year death_year __main__": = artist self.artist.print_info() print("Title: + self.title + ", " + str(self.year_created)) = = user_artist_name input() user birth_year int(input()) int(input()) input() year_created user_death_year user title user_year_created int(input()) + str(self.death_ new_artwork.print_info() user_artist Artist (user_artist_name, user_birth_year, user_death_y new_artwork Artwork(user_title, user_year_created, user_artist)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Computational Systems
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
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