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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" type="text/css"> | |
<link href="styles.css" rel="stylesheet"> | |
<script src="https://code.jquery.com/jquery.min.js"></script> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> | |
<script src="main.js"></script> | |
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
for (Projectile bullet : bullets) { | |
for (Asteroid asteroid : asteroids) { | |
if ((bullet.x - asteroid.x) < (bullet.w + asteroid.w)/2 && | |
(bullet.y - asteroid.y) < (bullet.h + asteroid.h)/2) { | |
for (int k = 20; k > -1; k--) { | |
asteroid.w = k; | |
asteroid.h = k; | |
asteroid.display(); | |
} |
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
##Tic-Tac-Toe Game by Palmer Paul | |
print("Welcome to Tic-Tac-Toe!") | |
print() | |
stats = {"p1wins": 0, "p2wins": 0, "ties": 0} | |
def tictactoe(a): | |
board_label = ["1", "2", "3", "4", "5", "6", "7", "8", "9"] | |
board = [" ", " ", " ", " ", " ", " ", " ", " ", " "] |
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
def reverse(it): | |
arr = list(it) | |
for i in xrange(len(arr)//2): | |
arr[i], arr[~i] = arr[~i], arr[i] | |
return arr | |
def reverseGen(it): | |
arr = list(it) | |
for i in xrange(len(arr)): | |
yield arr[~i] |
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
oceans = [[], [], [], [], []] | |
def RegTemp(regcode): | |
oceans[regcode-1].append((int(input("Digite la temperatura: ")), input("Digite la fecha: "))) | |
Mayor = lambda regcode: max(i[0] for i in oceans[regcode-1]) |
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
#!/usr/bin/env python2.7 | |
""" | |
Decorator that logs the input and output of a function. Useful for debugging. | |
""" | |
from functools import wraps | |
__author__ = 'Palmer Paul' | |
__version__ = '1.0.0' |
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
#!/usr/bin/env python2.7 | |
from __future__ import print_function | |
"""Practice with Matrices""" | |
# Create our Matrix | |
matrix = [[1, 2, 3], | |
[4, 5, 6], | |
[7, 8, 9]] |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> | |
<!-- NAME OF YOUR PROCESSING SKETCH GOES HERE --> | |
</title> | |
<style type="text/css"> | |
body { margin: 0 } |
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
#!/usr/bin/env python2.7 | |
"""Vigenere Cipher""" | |
from string import ascii_uppercase as alphabet | |
__author__ = 'Palmer (pzp1997)' | |
__version__ = '1.0.0' | |
__email__ = 'pzpaul2002@yahoo.com' |