ASCII-Bot Challenge

ascii-bot-challengeIn this challenge we will use the print() instruction in Python to create an ASCII-bot: A robot made of ASCII characters, in other words characters that you can type with a standard QWERTY keyboard.

Python Code


This is what your code will look like:

#ASCII-Bot Challenge - www.101computing.net/ASCII-bot-challenge/

print("         +-+      +")
print("           | +-+  |   +-+")
print("     +-+   |   |  |   |    +--+")
print("       |   |   |  |   |    |")
print("       |   |   |  |   |    |")
print("   +---+---+---+--+---+----+----+")
print("   |                            |")
print("   |   +-------+     +-------+  |")
print("+--+   |       |     |       |  +--+")
print("|  |   |       |     |       |  |  |")
print("|  |   |    +--+     |    +--+  |  |")
print("+--+   |    |--|     |    |--|  +--+")
print("   |   +-------+     +-------+  |")
print("   |             +-+            |")
print("   |             | |            |")
print("   |             +-+            |")
print("   |  +--+               +--+   |")
print("   |    +-----------------+     |")
print("   |                            |")
print("   +----------------------------+")
print("")
print("      ASCII-BOT: Hello World!")

Step 1: ASCII Art


Use asciiflow.com to create your own robot using ASCII characters.

Step 2: Create the Python code


Once your ASCII art is complete click on the export-iconicon to generate the ASCII code. Copy and paste the code in the trinket window below.

Add print(“ at the beginning and “) at the end of each line of your ASCII art and check if your code is working by running the code using the play-code-iconicon.

asciiart

Did you like this challenge?

Click on a star to rate it!

Average rating 3.7 / 5. Vote count: 15

No votes so far! Be the first to rate this post.

As you found this challenge interesting...

Follow us on social media!

Tagged with: