Skip to content

Instantly share code, notes, and snippets.

View sunnyeyez123's full-sized avatar

Jasmine Lawrence sunnyeyez123

View GitHub Profile
@sunnyeyez123
sunnyeyez123 / bankaccount.py
Last active November 2, 2017 06:49
This wasn't that tricky. I think I will modify this behave more like an ATM than just an account. It will allow the user to interact and specify withdraw/deposit amounts. I will also require a pin for their account. I can make it so different users can store their pins.
''' A bank account experience that allows you to view the balance of, deposit to and withdraw from your account'''
class BankAccount(object):
balance = 0
def __init__(self,name):
self.name = name
def __repr__(self):
return "%s's account. Balanace: %.2f" %(self.name, self.balance)
@sunnyeyez123
sunnyeyez123 / RPS.py
Created October 21, 2017 06:31
A basic game of Rock, Paper, Scissors. Maybe i'll extend to to add Lizard and Spock!
'''This is a simple game of rock, paper, scissors!'''
from random import randint
from time import sleep
OPTIONS = ["R", "P", "S"]
LOSER = "You lost."
WINNER = "You won!"
def decide_winner(user_choice, computer_choice):
@sunnyeyez123
sunnyeyez123 / AreaCalculator.py
Created October 20, 2017 05:38
I am just getting into Python to ease myself back into writing code more regularly. I made this program in a Codecademy freeform project. I want to expand it to different shapes.
'''This is a program that calculates the area of triangles and circles'''
from math import pi
from time import sleep
from datetime import datetime
now = datetime.now()
print "The calculator is starting"
print "Current time: %s/%s/%s %s:%s" % (now.month, now.day, now.year, now.hour, now.minute)
@sloria
sloria / bobp-python.md
Last active May 1, 2024 08:37
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens