All pastes #2045332 Raw Edit

python

public python v1 · immutable
#2045332 ·published 2011-04-12 03:17 UTC
rendered paste body
from datetime import date, datetimeclass Ej:  def __init__(self):    now = datetime.now()    self.fecha = date(now.year, now.month, now.day)    print "Para su cumple:"    dia = input("Ingrese el dia\n")    mes = input("Ingrese el mes\n")    self.fecha_cumple = date(now.year, mes, dia)  def diasHastaMiCumple(self):    dif = (self.fecha_cumple -self.fecha).days    if (dif<0):      dif += 365    return difinst = Ej()print ("Faltan %s dias para tu cumpleaños" % inst.diasHastaMiCumple() )