Advertisement
dsvfcgsdvfsdewga

MAIN

Dec 13th, 2021
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.13 KB | None | 0 0
  1. Main
  2. ##########
  3.  
  4. from Cities import Rifa
  5.  
  6. Sorteo = Rifa()
  7.  
  8. NumerosVendidos = ['2','3','7','8','10',
  9.                     '11','12','14','16','18',
  10.                     '19','20','21','22','25',
  11.                     '26','28','29','30','31',
  12.                     '32','33','36','40','43',
  13.                     '45','49','51','53','54',
  14.                     '56','57','58','60','61',
  15.                     '63','64','65','67','68',
  16.                     '70','71','72','76','78',
  17.                     '86','87','90','91','92',
  18.                     '93','98','99','100']
  19.  
  20.  
  21. NumerosSinVender = ['1','4','5','6','8'
  22.                    ,'9','13','15','17','23',
  23.                    '24','27','34','37','38',
  24.                    '39','41','42','44','46',
  25.                    '47','48','50','52','55',
  26.                    '59','62','66','69','73',
  27.                    '74','75','77','79','80',
  28.                    '81','82','83','85','87',
  29.                    '89','94','95','96','97',]
  30.  
  31.  
  32. menu = '''*************************************
  33. **            RIFA                 **
  34. *************************************
  35. **                                 **
  36. ** 1) Vender un numero             **
  37. ** 2) Ver compradores              **
  38. ** 3) Realizar sorteo              **
  39. ** 4) Mostrar resumen rifa         **
  40. ** 5) Borrar rifa                  **
  41. ** 6) Salir                        **
  42. **                                 **
  43. *************************************'''
  44.  
  45. def main():
  46.     opcion = '0'
  47.     while opcion != '6':
  48.         print(menu)
  49.         opcion = input('ingrese una opcion \n').upper()
  50.         print()
  51.         if opcion == '1':
  52.             print('++++++++++ Vender un numero +++++++++++')
  53.             NOMBRE = input('Introduzca su nombre: ')
  54.             NUMERO = input('Selecciona un numero disponible de la rifa: ')
  55.             print('2500')
  56.             print('Olla')
  57.             VALOR  = ('2500')
  58.             PREMIO = ('Olla')
  59.             r = Sorteo.insertar_datos(NOMBRE,NUMERO, VALOR, PREMIO)
  60.             if (r == 0):
  61.                 print('Los datos han sido ingresados correctamente')
  62.             else:
  63.                 print('Los datos han sido ingresados correctamente')
  64.         elif opcion == '2':
  65.             print('++++++++++ Ver compradores +++++++++++')
  66.             print (Sorteo)
  67.         elif opcion == '3':
  68.             print('++++++++++ Realizar sorteo +++++++++++')
  69.         elif opcion == '4':
  70.             print('++++++++++ Mostrar resumen +++++++++++')
  71.             VALOR1  = ('2500')
  72.             PREMIO1 = ('Olla')
  73.             print('NUMEROS VENDIDOS')
  74.             print(NumerosVendidos)
  75.             print('NUMEROS SIN VENDER')
  76.             print(NumerosSinVender)
  77.             print('VALOR DE LA RIFA')
  78.             print(VALOR1)
  79.             print('PREMIO DE LA RIFA')
  80.             print(PREMIO1)
  81.         elif opcion == '5':
  82.             print('++++++++++ Borrar rifa +++++++++++')
  83.             r = Sorteo.eliminar_rifa
  84.             print('Eliminacion exitosa')
  85.         elif opcion == '6':
  86.             print('Saliendo del sistema, gracias')
  87.         else:
  88.             print('Opcion invalida')
  89.  
  90.  
  91.  
  92. if __name__ == '__main__':
  93.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement