Anusha's Poetry Slam- files

by Anusha Suresh

06 Jun 2017

Here is my embed code:

And my Reflection: For the life of me I could not figure this out. I got some parse errors, bad input errors, bad EOFs, almost everything. Then I had the idea of putting the original poetry slam code in a defintion and calling the definition when I ask the user to decide whether or not they want to save the file. I started with having the user decided if they want to save it, and that is the first thing they do. It made sense to me to do it that way so that I would be able to use some if statements. So if they said yes, then it would carry out the process of naming and saving the file. From what I can tell this mostly works now. I ran into a lot of issues using the with in the statements and opening as. Somehow, after messing with that statement, I came to the current solution. My current program seems to create the new file and save it, but when I tested it, it looks right on main.py, but when I open the files, they say null. I’m really not sure what is going on here, or how to fix it. I included a print statement but it prints the name of the file. On the other hand, the if statement that handles the no is very straight forward, so I know that works the way it should.

I am currently a rising junior here at UNC. I am hoping to be an INLS major, though I am currently a minor. In regards to this class, I have tried programming several times before with no success, but I am determined to learn something from this course. I love the fall, cookies and cream milkshakes(plus points if it's a malted shake), and jokes (good and bad, mostly). Find Anusha Suresh on Twitter, Github, and on the web.