Created
October 19, 2021 16:20
-
-
Save ejherran/c3d3e269ab83ec7fcb1509b9896772e4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
cantidad = int(input("Cantidad a comprar:\t\t")) | |
compra = float(input("Precio de compra:\t\t")) | |
venta = float(input("Precio de venta:\t\t")) | |
try: | |
ingreso = float(input("Margend de ganancia (20%):\t")) / 100 | |
except: | |
ingreso = 0.2 | |
diferencia = venta-compra | |
margen = diferencia / compra | |
print("\n\n================================================================") | |
print("DIFERENCIA:\t\t" + str(diferencia)) | |
print("MARGEN DE GANANCIA:\t" + str(margen * 100) +"%") | |
print("INGRESO:\t\t" + str(diferencia * cantidad) + " ISK") | |
if(margen >= ingreso): | |
print("\t\t\t>> ES RENTABLE <<") | |
else: | |
print("\t\t\t>> NO ES RENTABLE <<") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment