Skip to content

Instantly share code, notes, and snippets.

@ejherran
Created October 19, 2021 16:20
Show Gist options
  • Save ejherran/c3d3e269ab83ec7fcb1509b9896772e4 to your computer and use it in GitHub Desktop.
Save ejherran/c3d3e269ab83ec7fcb1509b9896772e4 to your computer and use it in GitHub Desktop.
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