About Me ASCII Project

9/14/17

So on Tuesday I learned about ASCII art and about trinket.io, a website that I used to make some basic program functions. The ASCII art is made from many lines, dots, underlines, letters, and other characters combined to visually create an identifiable object, like an animal. As a huge example, I saw someone's creation of part of the first Star Wars movie, created entirely in ASCII art. The creator says there are currently 16481 frames! Find it here: http://www.asciimation.co.nz/


SO after that, I was a little intimidated, but I got to work. On trinket.io, I was asked to create a mini project that included my favorite animal, where I'm from, my hobbies, some facts about myself, and my age in dog years. This seemed very daunting at the time. Fortunately, there were instructions provided on how to code the above things.

The majority of my entries were print commands: print("stuff"). As for the ASCII art, I used the print command and the three individual quotes command, which tells the program to print whatever is in between the quotes, exactly as it is typed (in terms of line spacing and such). So, I was able to simply copy and paste some pre-made ASCII art from other websites in between some triple quotes, pretty easily! For example, here's my code for a really cute giraffe:
print('''     
     .-",
     `~||
       ||___
       (':.)`
       || ||
       || ||
       ^^ ^^ ''')

I practiced these skills with more print commands and even created my own ASCII art, like a picture of CT and some people throwing a frisbee.


I followed the rest of the pdf instructions pretty easily, because it told me exactly what I had to type to make it work. To create the prompt that asks the user's age and then calculates their age in dog years, I was told to make some inputs and variables. I wanted to learn more about them and how they actually worked, so I tried to add something different.


At first, I wanted it to prompt: Would you like to a pattern of squares or a pattern of triangles? I made some squares and triangles using ASCII, and made them variables. Through much trial and error, I couldn't figure out how to use an input that wasn't an integer (as it was in the dog year example). I kept getting errors. I asked a friend that knows how to code, and he said I needed to use strings. I don't know what that meant or what those are. I was running out of time to work on this, and had to work on an English essay (which is due tomorrow, yikes), so I had to simplify my goal. I created a new idea, where the variable again would be an integer. I tried a lot of different things, but eventually I came out with a code that prompted the user to enter how many fish they would like to see, and then that many fish would then show up on the screen! I was really proud of myself because I was able to take a skill that was shown to me, and make something different with that knowledge. 

Another little thing that I wanted to figure out was how to make spaces in between the lines, in the output. I realized that line spaces in the program meant nothing, except maybe to organize the code. I quickly found out for myself that this code made a line space in the program when displayed: print(''' ''').

I liked this mini project because it was structured enough that I learned some new things, but also open enough that I got to think and create for myself. I liked the format and approach of this project.

I think I do need to go back to python room and figure out what the heck strings are though!

OH

Here's the link to my trinket.io page: https://trinket.io/python/e425f573c1

-Mimi

Comments