February 10, 2015

Week of 02/01/15 - Python Part 18: Problem

     Recently, codingground has been very finicky. I open up it's website, click on "python-3", and instead of redirecting me to it's Python 3 interpreter and IDE, it just refreshes the page and doesn't do anything. And just, now it started working again. I can't handle the fact that sometimes it just doesn't work. Therefore, I'm looking around for a different online interpreter. I was looking at codeanywhere, but after some careful reading, I learned that using it for free was only a week-long trial. I settled on koding, but first I need to figure out how to use it. It seems to me that koding is a virtual machine with a http server, but all I need to use it for is as an executor of python code.

     So what have I done so far on koding? Well, for starters, I finally got the turn number to increment, using the variable used in the for-loop. It used to look like this, with the incrementer (turn_number += 1) being in the turn() function.
if AI_choice == "1":
    turn_number = 0
    for i in range(1,10):
        turn(turn_number, playing)
     But then, I thought that maybe it wasn't incrementing due to a problem with the variable itself. So I decided to try using the variable I used to make the loop, i, in the turn() function itself:
if AI_choice == "1":
    for i in range(1,10):
        turn(i, playing)

    I would post more this week, but on Friday I looked for more html stuff to make my website better. Specifically, I made it so the positioning of my code in the pre tag was centered, so that it looked nicer. Then, on an older post, number 15, I screwed around with the html until I centered the example of the tic-tac-toe board. I learned about html positioning, including absolute and relative positioning.

No comments: