Skip to content

Instantly share code, notes, and snippets.

View akinjide's full-sized avatar

Akinjide Bankole akinjide

View GitHub Profile
@akinjide
akinjide / guess.py
Last active May 5, 2017 09:30
A simple Guess The Number game implementation in Python.
from random import randrange
class Guess:
def play(self):
print "The computer will select a secret number between 1 and 10."
print "Try to find the secret number using a minimum number of guesses."
play, secret, guess, guesses, answer = True, 0, 0, 0, None
while play:
@akinjide
akinjide / prototypal.js
Created March 22, 2017 09:21
JavaScript Prototypal Inheritance
function ParentScope(){
this.aString = "parent string";
this.aNumber = 100;
this.anArray = [10,20,30];
this.anObject = {'property1': 'parent prop1', 'property2': 'parent prop2' };
this.aFunction = function(){ console.log('parent output'); }
}
function ChildScope(){
}