Guest User

Untitled

a guest
Dec 10th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. #-*- coding:utf-8 -*-
  2. class compra():
  3.  
  4. def __init__(self):
  5. self.productos = int(raw_input('CANTIDAD DE STOCK DE PROVEEDORES?: '))
  6. def entrada(self,stock):
  7. self.productos += stock
  8. def salida(self,stock):
  9. self.productos -= stock
  10. def contador(self):
  11. return self.productos
  12.  
  13. producto = compra()
  14. print producto.contador()
  15.  
  16. class venta():
  17.  
  18. def __init__(self):
  19. self.productos = int(raw_input('CANTIDAD DE PRODUCTOS PARA VENTA?: '))
  20. def entrada(self,stock):
  21. self.productos += stock
  22. def salida(self,stock):
  23. self.productos -= stock
  24. def contador(self):
  25. return self.productos
  26.  
  27. producto = venta()
  28. print producto.contador()
  29.  
  30. producto.salida(int(raw_input('CANTIDAD DE PRODUCTOS VENDIDOS?: ')))
  31. print 'TE QUEDAN', producto.contador()
Add Comment
Please, Sign In to add comment