In this chapter, you learned how to nicely format strings using the print() and str.format() functions. You also learned how to gather information from the user with the input() function. In this project, you are going to make use of those skills to create a dynamic display of character artwork.

Reminder - Your Coding Platform
In the first chapter activity, you learned how to use our online Python engine to submit projects for grading. Or, you may have followed other instructions to code and test Python programs on your own computer and submit them to your teacher separately. Please review the first chapter activity instructions and your choice of a coding platform, if needed, for details on how to complete and submit this project.

Creating Character Artwork
Early computers were not able to display high-resolution, color images. Instead, creative users designed artwork using nothing more than the characters on your keyboard. Can you tell what this image represents?

+--------------------+
| |> |
| |\ |
| | \ |
| | \ |
| | \ |
| | \ |
| \==============/ |
| \____________/ |
| |
+--------------------+
In Python, you can create similar artwork by drawing one line at a time with print() statements. The following three statements would display the first three lines of our sample sailboat artwork.

print("+--------------------+")
print("| |> |")
print("| |\ |")
Copy
Can you imagine how to create your own artwork, using just the characters on your keyboard?

Activity Requirements
In this activity, you are going to create a Python program that asks the user for an artist name. Your program will then print out an image of your own creation (or you can duplicate our sailboat). Near the bottom of the art frame, you should print the artist's name on a signature line.

Complete your program by following these steps:

Start your Python code with a comment at the top showing your name.
At the beginning of your program, ask for the artist's name using the input() function, and store the results in a variable called artist.
Use multiple print() functions to display most of your creative artwork. Add as many print() lines as you need and experiment to get the image you want.
Before you print a bottom line, build a signature string variable using the str.format() function. This variable should hold an output line containing the artist's signature. When building the signature line, your program should:
Ensure the artist name and surrounding spaces take up exactly enough characters (e.g. 20 characters) to fit your overall image. This means you need to set the width of the artist's name in the output.
Center the artist name within the horizontal space you have for the line.
Limit (truncate) the artist name to 10 characters when printing.
You can meet signature line requirements by using the str.format() function and the width, truncation, and alignment options described in this chapter.

Hint: If your overall image width is 22 characters, including a vertical bar character "|" on each edge for the frame, then you want your artist's name to be centered in a field that is 20 characters wide. Your format string for str.format() would start as "|{0:20}|" and then you would need to add the options for truncation to 10 characters and center alignment.

Activity Results
When you are done, run your code and verify the results. The example below shows our sailboat artwork with a signature line for the artist "Camille".

What is the artist name? Camille
+--------------------+
| |> |
| |\ |
| | \ |
| | \ |
| | \ |
| | \ |
| \==============/ |
| \____________/ |
| |
| Camille |
+--------------------+
Your own artwork may look very different; be creative! Be sure to test your program twice. The first time, enter a name that is shorter than 10 characters. The second time, enter a name that is longer than 10 characters and make sure only the first 10 are printed on the signature line.

What is the artist name? Rumpelstiltskin
+--------------------+
| |> |
| |\ |
| | \ |
| | \ |
| | \ |
| | \ |
| \==============/ |
| \____________/ |
| |
| Rumpelstil |
+--------------------+
Activity Rubric
If your project is being automatically graded by our system, your grade will be calculated from 0 to 100 as follows:

Points Description
10 Add comment with name as first line of code
10 Declare and use artist variable
10 Declare and use signature variable
10 Use the input() function
10 Use multiple print() functions
25 Display correct signature with spacing when artist is less than or equal to 10 characters
25 Display correct truncated, 10-character signature when artist is greater than 10 characters

# Camille

In this chapter, you learned how to nicely format strings using the print() and str.format() functions. You also learned how to gather information from the user with the input() function. In this project, you are going to make use of those skills to create a dynamic display of character artwork.

Reminder - Your Coding Platform
In the first chapter activity, you learned how to use our online Python engine to submit projects for grading. Or, you may have followed other instructions to code and test Python programs on your own computer and submit them to your teacher separately. Please review the first chapter activity instructions and your choice of a coding platform, if needed, for details on how to complete and submit this project.

Creating Character Artwork
Early computers were not able to display high-resolution, color images. Instead, creative users designed artwork using nothing more than the characters on your keyboard. Can you tell what this image represents?

+--------------------+
| |> |
| |\ |
| | \ |
| | \ |
| | \ |
| | \ |
| \==============/ |
| \____________/ |
| |
+--------------------+
In Python, you can create similar artwork by drawing one line at a time with print() statements. The following three statements would display the first three lines of our sample sailboat artwork.

print("+--------------------+")
print("| |> |")
print("| |\ |")
Copy
Can you imagine how to create your own artwork, using just the characters on your keyboard?

Activity Requirements
In this activity, you are going to create a Python program that asks the user for an artist name. Your program will then print out an image of your own creation (or you can duplicate our sailboat). Near the bottom of the art frame, you should print the artist's name on a signature line.

Complete your program by following these steps:

Start your Python code with a comment at the top showing your name.
At the beginning of your program, ask for the artist's name using the input() function, and store the results in a variable called artist.
Use multiple print() functions to display most of your creative artwork. Add as many print() lines as you need and experiment to get the image you want.
Before you print a bottom line, build a signature string variable using the str.format() function. This variable should hold an output line containing the artist's signature. When building the signature line, your program should:
Ensure the artist name and surrounding spaces take up exactly enough characters (e.g. 20 characters) to fit your overall image. This means you need to set the width of the artist's name in the output.
Center the artist name within the horizontal space you have for the line.
Limit (truncate) the artist name to 10 characters when printing.
You can meet signature line requirements by using the str.format() function and the width, truncation, and alignment options described in this chapter.

Hint: If your overall image width is 22 characters, including a vertical bar character "|" on each edge for the frame, then you want your artist's name to be centered in a field that is 20 characters wide. Your format string for str.format() would start as "|{0:20}|" and then you would need to add the options for truncation to 10 characters and center alignment.

Activity Results
When you are done, run your code and verify the results. The example below shows our sailboat artwork with a signature line for the artist "Camille".

What is the artist name? Camille
+--------------------+
| |> |
| |\ |
| | \ |
| | \ |
| | \ |
| | \ |
| \==============/ |
| \____________/ |
| |
| Camille |
+--------------------+
Your own artwork may look very different; be creative! Be sure to test your program twice. The first time, enter a name that is shorter than 10 characters. The second time, enter a name that is longer than 10 characters and make sure only the first 10 are printed on the signature line.

What is the artist name? Rumpelstiltskin
+--------------------+
| |> |
| |\ |
| | \ |
| | \ |
| | \ |
| | \ |
| \==============/ |
| \____________/ |
| |
| Rumpelstil |
+--------------------+
Activity Rubric
If your project is being automatically graded by our system, your grade will be calculated from 0 to 100 as follows:

Points Description
10 Add comment with name as first line of code
10 Declare and use artist variable
10 Declare and use signature variable
10 Use the input() function
10 Use multiple print() functions
25 Display correct signature with spacing when artist is less than or equal to 10 characters
25 Display correct truncated, 10-character signature when artist is greater than 10 characters

Skwkwkwkkw

# John

artist = input("What is the artist name? ")

print("+--------------------+")
print("| <| |")
print("| |\\ |")
print("| | \\ |")
print("| | \\ |")
print("| | \\ |")
print("| \\==============/ |")
print("| \\____________/ |")
print("| |")
print("|{0:20}|".format(artist[:10]))
print("+--------------------+")

It doesn't print

I apologize for the mistake. It seems there was an issue with the formatting of the ascii art. Let me correct that for you.

```python
# John

artist = input("What is the artist name? ")

print("+--------------------+")
print("| <| |")
print("| |\\ |")
print("| | \\ |")
print("| | \\ |")
print("| | \\ |")
print("| \\==============/ |")
print("| \\____________/ |")
print("| |")
print("|{0:^20}|".format(artist[:10]))
print("+--------------------+")
```

This code should give the desired artwork with the artist's name centered and truncated to 10 characters.