Time Conversion-
ABOUT-
In this program we have to convert a given 12 hour AM/PM time into military(24-hour) time.
PROGRAM LINK-
https://github.com/shashank629/amFOSS-Tasks/blob/master/Task-5.py
PROGRAM LINK-
https://github.com/shashank629/amFOSS-Tasks/blob/master/Task-5.py
LOGIC-
- I had taken input of 12 hour AM/PM in the form of string('raw_input()').
- Then after I had checked various conditions by the help of 'if statement' which includes checking AM and PM for converting into military time
- I also used 'indexing' the string as very important part of my program.Simply in all conditions I checked by the help of indexing.
PROBLEMS-
- There are no such big problem but my some time is wasted in assigning the index in condition.
METHODS USED-
OVERVIEW-
This program is little bit confusing for some examples but after including all such conditions it became very easy.
Very good
ReplyDelete