Friday, May 16, 2014

Day 41

Explored Python at CodeCademy. Worked on, Python Syntax tutorial 12 of 13, learned about using a modulo to returns the remainder from a division.

The code used:
#Set spam equal to 1 using modulo on line 3!
spam = 3 % 2
print spam

The interaction looked like this:
1

Thursday, May 15, 2014

Day 40

Explored Python at CodeCademy. Worked on, Python Syntax tutorial 11 of 13, learned about using exponents.

The code used:
#Set eggs equal to 100 using exponentiation.
eggs = 10 ** 2
print eggs

The interaction looked like this:
100

Wednesday, May 14, 2014

Day 39

Explored Python at CodeCademy. Worked on, Python Syntax tutorial 10 of 13, learned about using math.

The code used:
# Set count_to equal to the sum of two big numbers
count_to = 72 + 23
print count_to

The interaction looked like this:
95

Tuesday, May 13, 2014

Day 38

Explored Python at CodeCademy. Worked on, Python Syntax tutorial 9 of 13, learned about multi-line comment.

The code used:
""" multi-line comment in the editor.
No # needed at all!
"""

There was no interaction, the code simply was to test out a multi-line comment.

Monday, May 12, 2014

Day 37

Explored Python at CodeCademy. Worked on, Python Syntax tutorial 8 of 13, learned about single line comment..

The code used:
# Single line comment.
mysterious_variable = 42

There was no interaction, the code simply was to test out a single line comment.

Sunday, May 11, 2014

Day 36

Explored Python at CodeCademy. Worked on, Python Syntax tutorial 7 of 13, learned about the interpreter, how it runs the code line by line, and checks for errors.

The code used:
spam = True
eggs = False

There was no interaction, the code simply set the variables to the corresponding values.

Saturday, May 10, 2014

Day 35

Explored Python at CodeCademy. Worked on, Python Syntax tutorial 5 & 6 of 13, learned about whitespace.

The code used:
Started with
def spam():
eggs = 12
return eggs
print spam()

Ended with
def spam():
eggs = 12
return eggs
print spam()

The interaction looked like this:
12