Skip to content

Instantly share code, notes, and snippets.

View algotruneman's full-sized avatar

Algot Runeman algotruneman

View GitHub Profile
@algotruneman
algotruneman / ASCII Play
Created June 30, 2013 17:56
Practice with: loops, ord and chr to understand Upper and Lower case ASCII codes.
#######################################
#
# asciiplay.py
# Algot Runeman
# November 11, 2012
# June 30, 2013 (reversed order of list)
#
#######################################
a = 'Jones'
@algotruneman
algotruneman / Rock, Paper, Scissors
Created June 30, 2013 17:38
Final version of the exercise of Mechanical MOOC "Rock, Paper, Scissors"
########################################
#
# rps.py - 1.7 Rock Paper Scissors Mechanical MOOC
# Algot Runeman
# 2012-11-30
#
########################################
##RPS MMOOC 1.7 Truth Table
##=========================
# Two function Samples
# First version doesn't export the calculation out of the function
# even though the function itself works just fine.
area = 0 # initialize the global variable
def area_rectangle(length,width):
area = length * width
print "inside function",area # area is evaluated inside the function 35 in my example