Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Nicolas Figueroa nicolasfig

🎯
Focusing
View GitHub Profile
@nicolasfig
nicolasfig / beca.py
Created Oct 10, 2012
Patron singleton by Rafa.
View beca.py
class BecaEstudiante:
beca= None
cont= 0
@classmethod
def getBeca(cls,nombreBecado):
if cls.cont<5:
cls.cont+=1
cls.beca= BecaEstudiante()
@nicolasfig
nicolasfig / guessMyNumber.py
Created Oct 16, 2012
Guess my number simple text game
View guessMyNumber.py
import random
guessesTaken = 0
print("Hello what is your name?")
name = input()
number = random.randint(1,20)
print("Well",name,",I am thinking of a number between 1 and 20.")
@nicolasfig
nicolasfig / hangman.py
Created Oct 17, 2012
Hangman game using random and indexing
View hangman.py
import random
HANGMANPICS = ['''
+---+
| |
|
|
|
|
=========''','''
@nicolasfig
nicolasfig / HelloPygame.py
Created Oct 17, 2012
Hello world and drawing some shapes using pygame
View HelloPygame.py
import pygame, sys
from pygame.locals import *
#Set up pygame
pygame.init()
#Set up the window
windowSurface = pygame.display.set_mode((500, 400), 0 , 32)
pygame.display.set_caption('Hello World')
View pascalArray.java
package recursion;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
public class Recursion {
public static void pascalArray(int[][] matrix) {
You can’t perform that action at this time.