Showing posts with label notes. Show all posts
Showing posts with label notes. Show all posts
Saturday, November 10, 2012
7/30 & 8/30: Coding
I got only 5 minutes of coding done on the 7th day of coding. Today on the other hand! This is what I did! ^_^ So awesome!! It turns any word into pyg-latin. I threw in lots of filler since I was hearing the voice of Dr. Heinz Doofenshmirtz in my head. His -Inator's are very inspiring.
I wonder if I can actually embed it into the blog so you can use it. Okay I can't figure out how to do it. But you can paste it into this which is where I've been practicing my python.
^_^ My code! *preens* It's so pretty!! *giddy*
print "BEHOLD! My Pig-Latin-Translator-Inator!!"
print "*voice of Doctor Doofenshmirtz*"
pyg = 'ay'
original = raw_input('Go ahead! Give me a word. I dare you!')
word=original.lower()
first=word[0]
vowel_word=word+pyg
new_word=word[1:]+first+pyg
if len(original) > 0 and original.isalpha():
if first=="a" or first=="e" or first=="i" or first=="o" or first=="u" or first=="A" or first=="E" or first=="I" or first=="O" or first=="U":
print vowel_word
else:
print new_word
print "Oh. I thought it was going to turn everything into pig noises or something like that... I could probably fix it, but this'll work. Well? Impressive isn't it. With it I shall control the ENTIRE TRI STATE AREA!! HAHAHAHAHAHAHA *chokes on a swallowed fly*"
else:
print "Well it looks like SOMEONE can't follow directions."
#word[0] means it starts at the 0 position of the word
#word[1:] means it starts in the 1 position and goes to the end
Thursday, November 8, 2012
6/30: Coding
Not much to say! I didn't spend that much time coding, but I do understand what I was doing a little bit better. Throwing the raw (and inelegant) code in to make sure I understand it later when I've slept and forgotten a bunch of things. This is after figuring it out twice, and it took me 20 minutes the second time as well since I didn't really understand it the first time around. And that was with the Q&A to guide me! The if, else, elif statements are rather mind bending. I am glad I spent the extra time with them. Even if it is 5 in the morning! But I get why the bottom code works! (I think.)
I'm noticing a few similarities between python and ruby. I think the Ruby platform I was working with was a little easier to understand, and it felt like I was learning faster. It wouldn't really let me go off script though. The python platform is giving me a much deeper understanding, even though it isn't as simple to understand. It's also a lot more willing to let me tamper with the code and the format they set up. So I can screw up! But the problem is I can screw up! So yeah. I think I'll be able to use Python better when I'm done simply because I'm spending so much more time on it.
I see how the old "Hitchhikers Guide" video game was set up. I could probably write something like that now. It would take me a while, but I think I could do it if I really wanted to have 100 diff options for every question and hated my free time. Hell I manged to ask a question, give several options, and depending on the answer, offer different responses!
Didn't do too much today. Made a yummy chicken salad. Skipped my coffee, but down diet Pepsi like it was full of crack. Had a "Psych" marathon! Recovered from all the election nerves of yesterday. Stayed in the house, all day. Feel a tiny bit guilty for that, but that's part of not working and not having a reason to leave the house.
Here is an awesome kickstarter project for time travel underpants! I really want some. If nothing else these should be made. Not my favorite DW swag, but cute. This idea comes from JRose at the cheeseblarg! She does some really fun things throughout the year and I love her scavenger hunts.
It's almost 6 am. I should take Ada dog out and get some sleep.
Notes:
#Starting code! Use # to get used to it. Must return true. Does not need to print.
def the_flying_circus(): #<- is the function.
if True or False: #Everything after function must be indented.
return True
elif 7+8>7**2: #elif statement comes before my else!
return False #return or print statements need a tab as well
else: #else statement is left blank
return True
Spelling is VITAL!! Get better at it. The below code is because I watched "the Wiz" earlier this year for the first time and have seen a billion "Sexy Dorathy!" costumes. Almost worked in my awesome Elphaba into the mention, but just didn't have the energy to be that witty.
def oz():
print "Welcome to Munchkin land!" #no extra tab yet since it's the A statement
print "Where are you from? Kansas or New York City?"
answer = raw_in
put("Type Kansas or New York City and press 'Enter'.")
if answer == "Kansas" or answer == "kansas":
print "White Dorathy! Great now we'll be seeing sexy halloween costumes for 50 years!" #this is a B statement, the return or print needs the extra indent like in the simple above code
elif answer == "New York City" or answer == "new york city" or answer == "NYC" or answer == "nyc":
print "Black Dorathy! Great, now we get our own Disco Diva!"
else:
print "Can't make up your mind? I guess you're from the Matrix!"
oz() #I'm assuming this is to define the end of the function
oz() #I'm assuming this is to actually run the function. I can have another function after that and it will run as long as it's been defined before hand.
clinic() #for example, not sure how it would run if I had a diff function for each answer. I bet I would have to attach the new function to the answer of the previous one.
I'm noticing a few similarities between python and ruby. I think the Ruby platform I was working with was a little easier to understand, and it felt like I was learning faster. It wouldn't really let me go off script though. The python platform is giving me a much deeper understanding, even though it isn't as simple to understand. It's also a lot more willing to let me tamper with the code and the format they set up. So I can screw up! But the problem is I can screw up! So yeah. I think I'll be able to use Python better when I'm done simply because I'm spending so much more time on it.
I see how the old "Hitchhikers Guide" video game was set up. I could probably write something like that now. It would take me a while, but I think I could do it if I really wanted to have 100 diff options for every question and hated my free time. Hell I manged to ask a question, give several options, and depending on the answer, offer different responses!
Didn't do too much today. Made a yummy chicken salad. Skipped my coffee, but down diet Pepsi like it was full of crack. Had a "Psych" marathon! Recovered from all the election nerves of yesterday. Stayed in the house, all day. Feel a tiny bit guilty for that, but that's part of not working and not having a reason to leave the house.
Here is an awesome kickstarter project for time travel underpants! I really want some. If nothing else these should be made. Not my favorite DW swag, but cute. This idea comes from JRose at the cheeseblarg! She does some really fun things throughout the year and I love her scavenger hunts.
It's almost 6 am. I should take Ada dog out and get some sleep.
Notes:
#Starting code! Use # to get used to it. Must return true. Does not need to print.
def the_flying_circus(): #<- is the function.
if True or False: #Everything after function must be indented.
return True
elif 7+8>7**2: #elif statement comes before my else!
return False #return or print statements need a tab as well
else: #else statement is left blank
return True
Spelling is VITAL!! Get better at it. The below code is because I watched "the Wiz" earlier this year for the first time and have seen a billion "Sexy Dorathy!" costumes. Almost worked in my awesome Elphaba into the mention, but just didn't have the energy to be that witty.
def oz():
print "Welcome to Munchkin land!" #no extra tab yet since it's the A statement
print "Where are you from? Kansas or New York City?"
answer = raw_in
put("Type Kansas or New York City and press 'Enter'.")
if answer == "Kansas" or answer == "kansas":
print "White Dorathy! Great now we'll be seeing sexy halloween costumes for 50 years!" #this is a B statement, the return or print needs the extra indent like in the simple above code
elif answer == "New York City" or answer == "new york city" or answer == "NYC" or answer == "nyc":
print "Black Dorathy! Great, now we get our own Disco Diva!"
else:
print "Can't make up your mind? I guess you're from the Matrix!"
oz() #I'm assuming this is to define the end of the function
oz() #I'm assuming this is to actually run the function. I can have another function after that and it will run as long as it's been defined before hand.
clinic() #for example, not sure how it would run if I had a diff function for each answer. I bet I would have to attach the new function to the answer of the previous one.
Tuesday, November 6, 2012
3/30 & 4/30: Coding and Resume
Yesterday's coding was fun! I learned things!! I made the date show up all pretty like. Granted it also was a much sloppier version than I saw in the Q&A forums. I kinda hate them for being full of people who are better at this than me and making me question my code. If I made it work, then it shouldn't matter that it took me forever or that it took twice as much code, or that it's not as simple. It working should be enough. But it's not. I want it to work and be pretty. I'm debating not going near the Q&A forums till I'm done so I don't get down, but what if I miss out on learning from my fellow students?
Today I wandered the city today for a few hours. I went to Macy's to poke HR with a stick to see if they would be more willing to work on my transfer if I bugged them in person. Of course they were all "Oh we don't have your transfer! We have never even heard of you!" -__-'
So that was a not joy.* I then went to Ross. I frolicked through the picture frame aisle! It was wonderful. Except of course for them having all the frame sizes I need. This is the first time I think I have ever actually decorated a home. It's really starting to feel like a place for me and my boyfriend. We have had so many separate places that we later merged, or places we knew were temporary stops and rather disliked, that it's the first time I think I've ever put this kind of effort into making a "home"
Then I went off to talk resumes with a friend that works in the financial district. It was fun and I was glad for the help since resume writing makes me tense and irritable. (I'm not just saying that because he reads this either! ;-P) It's nice to have people I can hang out with while my guy is out of town and it keeps me from feeling like such a shut in at the end of the day.
Target was my next stop for milk and Nutella, because I miss Nutella and am out of the pale excuse of a Trader Joe's substitute. I also got sucked into the workout wear. I love it so much!! I didn't buy any though because I'm not going to spend money I don't have. At least this time I won't!
Today I learned about greater than, equal to, not equal to, etc. Also about True and False statements and how not True* is False. Then came the tricky bit. if and else. I hate them. I got stuck and went and grabbed a strip of bacon and a diet pepsie and started writing this blog. I also decided that I need to start taking notes, so at the bottom of this blog will be notes to myself on things I want to remember but don't want to clutter my Facebook up with. I am not saving them on my computer because I know I'll just lose them. This is a sad reality of my life. I did get unstuck when I was half way through writing, but I am not going back to it tonight because it's already 2:10 am and I should get to sleep.
*these not True, not 8%3!=1**7 (which would be True) and not states are driving me rather nutty!
Notes to self.
"if" and "else" statements need to be at the same indentation (tab) spot.
% is a weird word that I can't remember but means this 10%3= 10/3= 3 with 1 left over so the answer is the 1 that is left over, not the three!
Capitalization and spelling matter!!
Don't forget my colon.
Doesn't look like spaces matter in 1 + 7 or 1+7 but "white space" does.
#hashtags are good for one line notes
"""Triple quotes are good if I need to insert a paragraph of notes."""
if I have "%s, is so great but %s is awful" % (A, B)- check the screen shot at top of post for reminder.
If I'm repeating a set value several times (such as "/") I can assign a value to it ("/"=P) and then I can use it in a code without typing it many times.
I think if it's in "s it's probably a string.
I can turn integers into a string by str(now.month) or str(87**0.05)
It's so silly! It took me a few tries to make it look better on output since I had no real plan.
Today I wandered the city today for a few hours. I went to Macy's to poke HR with a stick to see if they would be more willing to work on my transfer if I bugged them in person. Of course they were all "Oh we don't have your transfer! We have never even heard of you!" -__-'
My "You should take me serious" shoes.
So that was a not joy.* I then went to Ross. I frolicked through the picture frame aisle! It was wonderful. Except of course for them having all the frame sizes I need. This is the first time I think I have ever actually decorated a home. It's really starting to feel like a place for me and my boyfriend. We have had so many separate places that we later merged, or places we knew were temporary stops and rather disliked, that it's the first time I think I've ever put this kind of effort into making a "home"
Then I went off to talk resumes with a friend that works in the financial district. It was fun and I was glad for the help since resume writing makes me tense and irritable. (I'm not just saying that because he reads this either! ;-P) It's nice to have people I can hang out with while my guy is out of town and it keeps me from feeling like such a shut in at the end of the day.
I love my granny cart!
I use it for groceries and hauling picture frames!
Target was my next stop for milk and Nutella, because I miss Nutella and am out of the pale excuse of a Trader Joe's substitute. I also got sucked into the workout wear. I love it so much!! I didn't buy any though because I'm not going to spend money I don't have. At least this time I won't!
Today I learned about greater than, equal to, not equal to, etc. Also about True and False statements and how not True* is False. Then came the tricky bit. if and else. I hate them. I got stuck and went and grabbed a strip of bacon and a diet pepsie and started writing this blog. I also decided that I need to start taking notes, so at the bottom of this blog will be notes to myself on things I want to remember but don't want to clutter my Facebook up with. I am not saving them on my computer because I know I'll just lose them. This is a sad reality of my life. I did get unstuck when I was half way through writing, but I am not going back to it tonight because it's already 2:10 am and I should get to sleep.
*these not True, not 8%3!=1**7 (which would be True) and not states are driving me rather nutty!
^_^ Sometimes cities have neat things that make me happy!
Notes to self.
"if" and "else" statements need to be at the same indentation (tab) spot.
% is a weird word that I can't remember but means this 10%3= 10/3= 3 with 1 left over so the answer is the 1 that is left over, not the three!
Capitalization and spelling matter!!
Don't forget my colon.
Doesn't look like spaces matter in 1 + 7 or 1+7 but "white space" does.
#hashtags are good for one line notes
"""Triple quotes are good if I need to insert a paragraph of notes."""
if I have "%s, is so great but %s is awful" % (A, B)- check the screen shot at top of post for reminder.
If I'm repeating a set value several times (such as "/") I can assign a value to it ("/"=P) and then I can use it in a code without typing it many times.
I think if it's in "s it's probably a string.
I can turn integers into a string by str(now.month) or str(87**0.05)
Subscribe to:
Posts (Atom)