This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
HANGMANPICS = [''' | |
+---+ | |
| | | |
| | |
| | |
| | |
| | |
=========''',''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package recursion; | |
import java.io.BufferedWriter; | |
import java.io.IOException; | |
import java.io.OutputStreamWriter; | |
public class Recursion { | |
public static void pascalArray(int[][] matrix) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BecaEstudiante: | |
beca= None | |
cont= 0 | |
@classmethod | |
def getBeca(cls,nombreBecado): | |
if cls.cont<5: | |
cls.cont+=1 | |
cls.beca= BecaEstudiante() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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=[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------------------------------------------------- | |
# Name: Matrix | |
# Purpose: | |
# | |
# Author: Nicolas Figueroa | |
# | |
# Created: 06/10/2012 | |
# Copyright: (c) Nicolas Figueroa 2012 | |
#------------------------------------------------------------------------------- | |
import random |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Matriz: | |
def __init__(self, columnas, filas): | |
self.filas= filas | |
self.columnas= columnas | |
print("filas: ",filas,"columnas: ",columnas) | |
def llenarMattriz(self, filas, columnas): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------------------------------------------------- | |
# Name: Matrix | |
# Purpose: | |
# | |
# Author: Nicolas Figueroa | |
# | |
# Created: 06/10/2012 | |
# Copyright: (c) Nicolas Figueroa 2012 | |
#------------------------------------------------------------------------------- | |
import random |
NewerOlder