while he replied i was working on a solution, you need to learn object oriented programming, its a lot funner
class calendarconverter:
def christiantoislamic(self):
idate = input("Enter the Christian date:")
g = idate -579
if g <0:
print "The date in the Islamic calendar is" , g - g - g , "BH"
else:
print "The date in the Islamic calendar is" , g , "AH"
def islamictochristian(self):
cdate = input ("Enter the date:")
print "The date in the Christian calendar is" , cdate + 579 , "AD"
def run(self):
cal=input("1 or 2:")
if (cal == 1):
self.christiantoislamic()
elif (cal == 2):
self.islamictochristian()
else:
print"Use correct syntax please"
self.run()
calendar = calendarconverter()
calendar.run() works like a dream