Skip to content

Instantly share code, notes, and snippets.

@harrisi
harrisi / item_calculator.py
Last active February 16, 2017 21:08 — forked from Spockky/Item calculator
Python program that calculates the final price of an item after asking the user if there is an in-store discount and if they have a coupon.
# module calculate_store_discount() is where I am having issues. I also tried linking original_price()
# to calculate_store_discount() so I wouldn't have to have the user re-enter. The in_store_discount()
# and calculate_store_discount() are going to be 'duplicated' with variables relating to the
# coupon inputs and calculation ( calculate_coupon(), coupon_discount() ). Another module is going to
# be created to calculate the final price after I figure out what my hang up is with the math.
# Okay, so this is your `main` function. There's nothing special about it being
# called `main`, it's just done that way by convention since the beginning of
# time. It is your main "driver" for the program as a whole, which you can
# usually just assume, but you can be sure of it by seeing that at the bottom
@harrisi
harrisi / foo.java
Last active July 13, 2016 08:22
By-hand disassembled Java bytecode
class Foo {
public static void main(String args[]) {
System.out.println("Hello world!");
}
}