So I've kept up slowly with my coding. I think I'll keep trying to get it even past my 30 days. I like learning this and it is rather fun to go through it with my boyfriend on occasion. He's a better teacher than the internet and makes me work through things properly so that I actually understand them. I don't often have the courage to ask for help. Since I only make baby steps it's rather embarrassing to show how far I've come day by day.
I've had my birthday and have gotten old! I got to take the Ada-dog to Macy's and we took a picture with Santa Claus. ^__^ She was so polite and sweet. I got flowers and was taken to German dinner. It was nice!
I have also spent time creating Christmas Cards! (Or holiday cards for the non religious.) It was fun and took forever. I made embossed snowflake cards on nice midnight blue paper! It costs more than I like to do that sort of thing, but it was fun.
This is my latest code. Only works because I knew it was wrong and my boyfriend helped me work though it line by line. He actually wrote a tiny bit of it. I made it run. With a lot of hand-holding.
def fizzCount(x):
c = 0 #set c to = 0 in the function
for i in x:
if i == "fizz":
c += 1
return c
somelist = ["a","b","fizz","not_fizz","fizz"]
someotherlist = ["fizz", None]
athirdlist = [None, "not_fizz", "abcde", "fizz"]
listoflists = [somelist, someotherlist, athirdlist]
for l in listoflists:
print fizzCount(l)
For i in x:
for statements run though the x and look for i's. Confusing, but useful.
Showing posts with label code. Show all posts
Showing posts with label code. Show all posts
Saturday, December 1, 2012
Sunday, November 18, 2012
12/30-17/30: Coding
I've had a huge mental block with my coding. I haven't been able to figure out what I'm doing wrong and that means some days I've only spent 5 or 10 minutes on it.
Yesterday my boyfriend had a friend over. They both worked together at the UofM, Domino's and when we moved out here, D was able to convince J to move here as well. ^_^ After they were both out here they managed to convince two members of their UofM team to come out for interviews too. It's a movement!
I don't like to bother my boy too much with all this programing stuff, but I was so stuck that after our wandering I was sitting on the couch and eventually asked them for help. Having two insanely smart SRE's available to trouble shoot my baby code was quite nice. They also explained the difference between defining my code and calling it. Now I know what was going wrong! It's so awesome when you finally stop seeing the error code!
The site was not working one of the days, so I'm adding an extra day of coding onto the end of this 30 period. I still feel bad for not trying harder to work that day, but it happens. As soon as I finish this post I'm gonna take some real time to get into my next coding assignment. Functions are interesting.
The dog has been driving me crazy. She's barking at everything. I need to download all the episodes of "It's Me or the Dog" because I feel Victoria Stillwell's method of training is wonderful and will work really well with Ada.
List of things I want my dog to stop doing
- barking and lunging at other dogs (this seems to be an on and off behavior)
- barking and lunging at skateboards
- lunging at runners or other fast things that surprise her
- eating everything off the sidewalk
- nosing at people walking by us
- barking at homeless people
- chasing pigeons, ducks, squirrels, or anything really
Looking at it in print the list is longer than I would like. Poop! I hope I can manage to train her out of these. I'm not that consistent either. This is gonna be hard and take some time. I also need to buy a new clicker and a real reward pouch.
Yesterday my boyfriend had a friend over. They both worked together at the UofM, Domino's and when we moved out here, D was able to convince J to move here as well. ^_^ After they were both out here they managed to convince two members of their UofM team to come out for interviews too. It's a movement!
I don't like to bother my boy too much with all this programing stuff, but I was so stuck that after our wandering I was sitting on the couch and eventually asked them for help. Having two insanely smart SRE's available to trouble shoot my baby code was quite nice. They also explained the difference between defining my code and calling it. Now I know what was going wrong! It's so awesome when you finally stop seeing the error code!
The site was not working one of the days, so I'm adding an extra day of coding onto the end of this 30 period. I still feel bad for not trying harder to work that day, but it happens. As soon as I finish this post I'm gonna take some real time to get into my next coding assignment. Functions are interesting.
The dog has been driving me crazy. She's barking at everything. I need to download all the episodes of "It's Me or the Dog" because I feel Victoria Stillwell's method of training is wonderful and will work really well with Ada.
List of things I want my dog to stop doing
- barking and lunging at other dogs (this seems to be an on and off behavior)
- barking and lunging at skateboards
- lunging at runners or other fast things that surprise her
- eating everything off the sidewalk
- nosing at people walking by us
- barking at homeless people
- chasing pigeons, ducks, squirrels, or anything really
Looking at it in print the list is longer than I would like. Poop! I hope I can manage to train her out of these. I'm not that consistent either. This is gonna be hard and take some time. I also need to buy a new clicker and a real reward pouch.
Tuesday, November 13, 2012
9/30-11/30: Coding
It's been a rough couple of days. I can't talk about it much at the moment.
I have been coding, but I seem to have hit a bit of a block. I'm not sure where I'm going wrong and my personal consultant (aka my boyfriend) is unavailable. I was really hoping I would understand this better. Also the Q&A forums aren't giving me any answers.
So since I don't have too many to talk about here is a picture of the bathroom. I like it.
Ada and I also spent the night at my girls house. We chased goats, and ate chicken and knitted things. It was awesome. While she was picking up the goats from the goat spa I woke up and took her dog, Iggy, and the Ada-dog to the beach. Ada kept trying to get close to a pair of dead seagulls. There was also tons of seaweed with dead starfish and crabs in it. We moved over one beach because I was tired to trying to convince her that it was a bad idea.
So Iggy is the most relaxed dude. Stays close by and comes as soon as you ask him. Seriously chill. Ada on the other hand, races as fast as she can up the beach, races back, skids to a stop in front of me (just to check in real fast mom!) and then races off again as fast as possible. They both got some love from a set of kids with parents who were completely unworried about the fact that Ada was a Doberman Pincher. Woo! They chased her all up and down the beach. Iggy did some exploring. Tons of petting and lots of fun. Lucy Lui (the dog, not the actress) came onto the beach and she and Iggy did their butt sniffs. Ada decided that she had to protect him and barked her head off. ^__^ She was jealous!
I have been coding, but I seem to have hit a bit of a block. I'm not sure where I'm going wrong and my personal consultant (aka my boyfriend) is unavailable. I was really hoping I would understand this better. Also the Q&A forums aren't giving me any answers.
So since I don't have too many to talk about here is a picture of the bathroom. I like it.
Swirly twirly circles and gray.
Ada and I also spent the night at my girls house. We chased goats, and ate chicken and knitted things. It was awesome. While she was picking up the goats from the goat spa I woke up and took her dog, Iggy, and the Ada-dog to the beach. Ada kept trying to get close to a pair of dead seagulls. There was also tons of seaweed with dead starfish and crabs in it. We moved over one beach because I was tired to trying to convince her that it was a bad idea.
So Iggy is the most relaxed dude. Stays close by and comes as soon as you ask him. Seriously chill. Ada on the other hand, races as fast as she can up the beach, races back, skids to a stop in front of me (just to check in real fast mom!) and then races off again as fast as possible. They both got some love from a set of kids with parents who were completely unworried about the fact that Ada was a Doberman Pincher. Woo! They chased her all up and down the beach. Iggy did some exploring. Tons of petting and lots of fun. Lucy Lui (the dog, not the actress) came onto the beach and she and Iggy did their butt sniffs. Ada decided that she had to protect him and barked her head off. ^__^ She was jealous!
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
Subscribe to:
Posts (Atom)