Is there a method in Python like this already:
 
[code]
#This program calculates how many days it has been from one day to the other.
 
def first_date():
    1y = int(raw_input("Enter the year of the first date: "))
    1m = int(raw_input("Enter the month of the first date: "))
    1d = int(raw_input("Enter the day of the first date: "))
 
def second_date():
    2y = int(raw_input("Enter the year of the second date: "))
    2m = int(raw_input("Enter the month of the second date: "))
    2d = int(raw_input("Enter the day of the second date: "))
 
def calculate_days(year, month, day):
   
[/code]
 
Just being curious,
Nathan Pinno
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to