Last active
September 23, 2018 21:20
-
-
Save gunnarig/70201d42277b8562a10e926d48a78b24 to your computer and use it in GitHub Desktop.
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
from fractions import Fraction | |
def integer(first): | |
while first is int: | |
return True | |
def fraction(second): | |
while second is Fraction: | |
return True | |
#def share_price(mult): | |
#shares * price = mult | |
#print(mult) | |
#[int(i) for i in input().split()] | |
# | |
while True: | |
#try: | |
#int(input("Enter number of shares: ")) | |
#except ValueError: | |
#print("Invalid number!") | |
price = Fraction(a,b+c,d)(input("Enter price ( dollars, numerator, denominator: ")) | |
print(price) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment