Ok, we're going to try this one more time.
I find it difficult to post my coding experiences, since I'm mainly doing lessons and I quite frankly don't have much to talk about. But I've been playing around with something new.
Game Design.
Using Game Maker Studio, I've started, well, making games. Games about my life and interests to be precise. It probably sounds dull from your perspective, but its helped me to cope with a lot of the stress and turmoil I've been experiencing with my time out here.
I think my new goal will be to share the progress of these games, include some statements behind them.
This might be the most therapeutic thing I could have ever done.
Showing posts with label Misc. Show all posts
Showing posts with label Misc. Show all posts
Monday, August 4, 2014
Wednesday, May 7, 2014
The story so far:
As I mentioned in the introductory post, I didn't really develop a curiosity of programming until I had begun to build and upgrade my first Windows PC. A friend of mine, we'll call him Boots, was more than happy to lend a hand in answering every question I had concerning computers. He was the first to introduce me to the basic concepts and syntax of Python, giving me basic lessons that included the print() and input() functions, the while and for loops, if, then statements as well as a few modules like random.
At this point, one of my first assignments was to create a script that would simulate a coin flip. After a little thought and a fair amount of frustration, here was the completed result:
while 1 == 1:
import random
a = raw_input("Coin Flip? (y/n)")
if a == "y":
x = random.randint(1, 2)
if x == 1:
print ("Heads")
if x == 2:
print ("Tails")
While this code is rather primitive compared to most other variations of a "Coin Flip" I've seen, I was still no less excited to have created code that actually did what I wanted it to do.
However, being so caught up as a student in Chemical Engineering, I never made much time to learn much beyond this. I once did attempt to write a script that would solve a quadratic formula, however it would consistently crash if imaginary numbers became present. You can see that code here:
while 1 == 1:
import math
print ("Quadratic Formula")
a = int(input("a: "))
b = int(input("b: "))
c = int(input("c: "))
x = (b**2-(4*a*c))
if x < 0:
print ("Imaginary Number(s) Present")
print (((-b)+math.sqrt(b**2-(4*a*c)))/(2*a))
print (((-b)-math.sqrt(b**2-(4*a*c)))/(2*a))
I've been meaning to ask some more experienced programmers as to how to fix/rebuild this code, but it unfortunately was one of many tasks that has been put on the back burner. Maybe this summer I'll even be able to fix it myself...
-JWEST
I'm also realizing my little logo at the top of the page looks like it reads "Coding with JWESI"...
At this point, one of my first assignments was to create a script that would simulate a coin flip. After a little thought and a fair amount of frustration, here was the completed result:
while 1 == 1:
import random
a = raw_input("Coin Flip? (y/n)")
if a == "y":
x = random.randint(1, 2)
if x == 1:
print ("Heads")
if x == 2:
print ("Tails")
While this code is rather primitive compared to most other variations of a "Coin Flip" I've seen, I was still no less excited to have created code that actually did what I wanted it to do.
However, being so caught up as a student in Chemical Engineering, I never made much time to learn much beyond this. I once did attempt to write a script that would solve a quadratic formula, however it would consistently crash if imaginary numbers became present. You can see that code here:
while 1 == 1:
import math
print ("Quadratic Formula")
a = int(input("a: "))
b = int(input("b: "))
c = int(input("c: "))
x = (b**2-(4*a*c))
if x < 0:
print ("Imaginary Number(s) Present")
print (((-b)+math.sqrt(b**2-(4*a*c)))/(2*a))
print (((-b)-math.sqrt(b**2-(4*a*c)))/(2*a))
I've been meaning to ask some more experienced programmers as to how to fix/rebuild this code, but it unfortunately was one of many tasks that has been put on the back burner. Maybe this summer I'll even be able to fix it myself...
-JWEST
I'm also realizing my little logo at the top of the page looks like it reads "Coding with JWESI"...
Tuesday, May 6, 2014
Welcome + Introduction
Welp, this is probably the 12th blog I've started in my lifetime. Those of you who know me know where my life stands right now; a married, full time student with a part time job at my local U-Haul branch. My free time is limited, but I do have a goal for myself over the next year or two: learn programming.
I purchased my first PC around 2 years ago and have since been upgrading it piece by piece. As a result, I'm spending more and more time with a keyboard glued to my finger tips. With all of the free resources the internet provides, I fell in love with the idea of being able to create something with nothing more than some free software and a keyboard.
So that is what this blog will be, a log/journal following my experiences as I learn how to programming. To be honest, this may be dull at times for readers. This is more for my benefit. My hope is that by keeping a blog I may be a little more motivated to achieve this goal. I'll share the issues I come across, my completed code projects/assignments, jokes, anecdotes, and well, just about anything else I may consider relatable.
To begin, I'll work my way through Python 2.7, using Shaw's "Learn Python the Hard Way" and Sweigart's "Invent Your Own Computer Games with Python". My coffee is brewing and the Ramen is boiling, time to get started.
-JWEST
I purchased my first PC around 2 years ago and have since been upgrading it piece by piece. As a result, I'm spending more and more time with a keyboard glued to my finger tips. With all of the free resources the internet provides, I fell in love with the idea of being able to create something with nothing more than some free software and a keyboard.
So that is what this blog will be, a log/journal following my experiences as I learn how to programming. To be honest, this may be dull at times for readers. This is more for my benefit. My hope is that by keeping a blog I may be a little more motivated to achieve this goal. I'll share the issues I come across, my completed code projects/assignments, jokes, anecdotes, and well, just about anything else I may consider relatable.
To begin, I'll work my way through Python 2.7, using Shaw's "Learn Python the Hard Way" and Sweigart's "Invent Your Own Computer Games with Python". My coffee is brewing and the Ramen is boiling, time to get started.
-JWEST
Subscribe to:
Posts (Atom)