{{ message }}

Instantly share code, notes, and snippets.

🎯
Focusing

# Nicolas F nicolasfig

🎯
Focusing
• Bogota
Last active Feb 25, 2018
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) {
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')
Created Oct 17, 2012
Hangman game using random and indexing
View hangman.py
 import random HANGMANPICS = [''' +---+ | | | | | | =========''','''
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.")
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()
Created Oct 9, 2012
python: Programa de matrices para pygroup
View claseMatriz.py
 """ Realizado por: Rafael Baron Castro Cod: 20102020012 Nicolas Figueroa Beltran Cod: 20102020032 """ class Matriz: #constructor y atributos de la clase Matriz def __init__(self, filas, columnas): self.matriz=[]
Created Oct 7, 2012
python: Matrix operations using objecs "poorly structured"
View MatrixOp.py
 #------------------------------------------------------------------------------- # Name: Matrix # Purpose: # # Author: Nicolas Figueroa # # Created: 06/10/2012 # Copyright: (c) Nicolas Figueroa 2012 #------------------------------------------------------------------------------- import random
Created Oct 6, 2012
View ClaseMatrices.py
 class Matriz: def __init__(self, columnas, filas): self.filas= filas self.columnas= columnas print("filas: ",filas,"columnas: ",columnas) def llenarMattriz(self, filas, columnas):
Created Oct 6, 2012
python: This file contains several matrix operations
View matrices.py
 #------------------------------------------------------------------------------- # Name: Matrix # Purpose: # # Author: Nicolas Figueroa # # Created: 06/10/2012 # Copyright: (c) Nicolas Figueroa 2012 #------------------------------------------------------------------------------- import random
Created Oct 5, 2012
java: Calcula el numero euler basado en el factorial
View euler.java
 public class Euler { public static long fact(int x) { long prod = 1; for (int i = 1; i < x; i++) { prod = prod * i; } return prod; } public static double euler(){