def inicializarEgresos(self, egresos): # Cargo egresos for egreso in egresos: fecha = Fecha.toString(egreso.get("fecha")) temp = Importe(egreso.get("egreso"), fecha, egreso.get("valor")) # print("egreso: ", temp.fecha) self.addEgreso(temp)
def inicializarIngresos(self, ingresos): # Cargo ingresos for ingreso in ingresos: fecha = Fecha.toString(ingreso.get("fecha")) temp = Importe(ingreso.get("ingreso"), fecha, ingreso.get("valor")) # print("ingreso: ", temp.fecha) self.addIngreso(temp)
def __init__(self, fecha = None, hora = None, \ d=1,m=1,y=1970, h=0, M=0,s=0): if fecha == None: self.fecha = Fecha(d, m, y) else: self.fecha = fecha if hora == None: self.hora = Hora(h, M, s) else: self.hora = hora
def crear_asistencia_laboratorio(self): system('clear') print('Crear asistencia laboratorio') codigo_laboratorio = input('Ingrese el codigo del laboratorio: ') pos_laboratorio = self.colegio.buscar_laboratorio(codigo_laboratorio) if pos_laboratorio != -1: try: dia = int(input('Digite el dia: ')) mes = int(input('Digite el mes: ')) anio = int(input('Digite el anio: ')) fecha = Fecha(anio, mes, dia) codigo_asistencia = int( input('Digite el codigo de la asistencia: ')) asistencia_laboratorio = AsistenciaLaboratorio( fecha, self.colegio.get_laboratorio(pos_laboratorio), codigo_asistencia) while True: print('Asistencia Estudiante') print('1: Ingresar la asistencia del estudiante') print('2: Salir') op = input('Digite la opcion: ') if op == 1: codigo_estudiante = input( 'Digite el codigo del estudiante') pos_estudiante = self.colegio.buscar_estudiante( codigo_estudiante) if pos_estudiante != -1: asistencia_laboratorio.adicionar_estudiante( self.colegio.get_estudiante(pos_estudiante)) else: print('El estudiante no existe') elif op == 2: break else: print('Opcion no valida') input() self.colegio.adicionar_asistencia(asistencia_laboratorio) except ValueError: print('Digite un numero entero') else: print('El laboratorio no existe')
def __repr__(self): return Fecha.__repr__(self) + ' ' + Hora.__repr__(self)
def __str__(self): return Fecha.__str__(self) + ' ' + Hora.__str__(self)
def __init__(self, d=1, m=1, y=1970, h=0, M=0, s=0): Fecha.__init__(self, d, m, y) Hora.__init__(self, h, M, s)
def generar_fechaNac(): return Fecha(dia=randint(1, 30), mes=randint(1, 12), anio=randint(1950, 2002))
def main(self): fecha = Fecha() fecha.setFecha() mes = self.setMeses() self.imprimir(fecha, mes)
def ejecutar(self): obj=Fecha() obj.setFecha() diccionario=self.setDiccionario() self.imprimir(obj,diccionario)