Skip to content

Instantly share code, notes, and snippets.

View bolenton's full-sized avatar

Taurus Omejia bolenton

View GitHub Profile
@bolenton
bolenton / Fehrenheit to Celsius.py
Created January 30, 2015 01:29
Fehrenheit to Celsius.py
#this script will convert fahrenheit to celsius
def fahrenheit_to_celsius(cel):
f = cel*9/5+32
return f
def celsius_to_fahrenheit(fah):
c = (fah-32)*5/9
return int(c)
@bolenton
bolenton / fizz bizz.py
Created January 30, 2015 01:30
fizz bizz.py
# my take on fizz bizz
def fizz_bizz():
for i in range(1,101):
if i % 3 == 0 and i % 5 == 0:
print('fizz bizz')
elif i % 5 == 0:
print('bizz')
@bolenton
bolenton / rps.py
Created April 24, 2015 19:34
rps.py
from random import choice
import console
choices = ['rock', 'paper', 'scissors']
def design():
print('*********************************')
def winning_message(player_choice, computer_choice):
player_score = 0
using System;
using System.Windows.Forms;
using System.IO;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
using System;
using System.Windows.Forms;
using System.IO;
namespace Bethel_DFWMessageTool
{
public partial class Form1 : Form
{
public Form1()
{
using System;
namespace ChallengePostalCalculator
{
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
print("Yo fool! whats your name?")
user_name = input()
print("OK Trainer: {0}, so you want to be a pokemon master huh?".format(user_name.upper()))
print("This is gonna be a fun filled adventure mixed hard work!")
print("Are you sure this is what you want?")
print("-----------------------------------------------------")
print("(Yes) or (No)")
yes_or_no = input().upper()
class Deck
{
public Dictionary<int, string> CreateNewDeck()
{
Dictionary<int, string> newDeck = new Dictionary<int, string>()
{
{1, "~/cards/c1.png"}, {2, "~/cards/c2.png"}, {3, "~/cards/c3.png"}, {4, "~/cards/c4.png"},
{5, "~/cards/c5.png"}, {6, "~/cards/c6.png"}, {7, "~/cards/c7.png"}, {8, "~/cards/c8.png"},
{9, "~/cards/c9.png"}, {10, "~/cards/c10.png"}, {11, "~/cards/cj.png"}, {12, "~/cards/cq.png"}, {13, "~/cards/ck.png"},
{14, "~/cards/d1.png"}, {15, "~/cards/d2.png"}, {16, "~/cards/d3.png"}, {17, "~/cards/d4.png"},
using System.Web;
namespace WarCardGame
{
class Dealer
{
Random rand = new Random();
public void DealPlayersDeck(Deck cards, Dictionary<int, string> humanDeck, Dictionary<int, string> computerDeck)
{
var fullDeck = cards.CreateNewDeck();
@bolenton
bolenton / random number game.py
Created November 30, 2015 05:06
random number game.py
from random import randint
print(" Hey lets play a game!")
print("\n I'm' thinking of a number between 1 and 20.")
print('\n You have 5 turns to guess my number or you lose.')
raw_input("\n Press RETURN when you're ready go play .")
test = 0
num = randint(1, 20)