Ejemplo n.º 1
0
def main():
    day = int(input("Please input the date: "))
    month = int(input("Please input number of month: "))
    year = int(input("Please input number of year: "))
    date = Date(day, month, year)
    print(date)

    add_date = int(input("Enter number to add on the date: "))
    date.add_days(add_date)
    print(date)
Ejemplo n.º 2
0
def main():
    day = int(input("Enter day: "))
    month = int(input("Enter month: "))
    year = int(input("Enter year: "))
    date = Date(day, month, year)

    choice = "A"
    while choice != "N":
        choice = input("Add days? Y/N: ").upper()
        if choice == "Y":
            additional_days = int(input("How many days have passed?: "))
            date.add_days(additional_days)
        print(date)
def main():
    date = Date(22, 12, 2011)
    print(date)
    date.add_days(20)
    print(date)