Def convert_time(time):
"""split hours from minutes"
Time = raw_input("enter a time, in military: ")
If hours > 12
Hours = hours - 12
Am_or_pm = "p.m."
Output_hours = hours
Output_minutes = minutes
Output_hours = ""
Else:
Am_or_pm = "a.m."
-----Original Message-----
From: Kent Johnson [mailto:[EMAIL PROTECTED]
Sent: Monday, March 24, 2008 8:07 AM
To: Bartruff, Pamela J.
Cc: [email protected]
Subject: Re: [Tutor] how to write a function
Bartruff, Pamela J. wrote:
> Hello Python users,
>
> I am very new to Python, how do I program that converts 24 hour time
to
> 12 hour time? The program should have three functions(input,
conversion
> and output function)
This sounds like a homework assignment. We will help with homework but
we won't do it for you.
Do you know how to write a function? What is the time format? Where does
the input come from? What have you tried so far?
Kent
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor