Question: PLEASE USE BASIC PYTHON AND READ WHAT THE PORBLEM IS ASKING PLEASE.IF YOU CAN DETAIL WHY YOU WROTE THE CODE THAT WAY I WOULD APPRECIATE

PLEASE USE BASIC PYTHON AND READ WHAT THE PORBLEM IS ASKING PLEASE.IF YOU CAN DETAIL WHY YOU WROTE THE CODE THAT WAY I WOULD APPRECIATE IT SINCE I HAVE AN EXAM COMING UP AND WANT TO UNDERSTAND.I'LL MAKE SURE TO GIVE A THUMBS UP.HAVE A GREAT DAY. please dont use too many condtionals as they dont want us to write as much code so less than 40 lines please. thank you
Question 3(hw4_q3.py):
Write a function named date_time_parser that takes as input a string that represents
the date and time (24-hour clock) in the following format: "HR: MIN:SEC MM/DD/YYYY"
and prints the following:
DD/MM/YY
HR:MIN:SEC
MM/YYYY
Whether the time is "AM" or "PM"
Validation of the input in the function is necessary. In fact, write a second function,
named input_is_valid, that takes as input the full time input string discussed above,
and returns a True or False value to indicate if the input string is valid (True) or invalid
(False).
For example, if the user gives an input of "13:12:12122/04/1990", the given string is
invalid, as there can be only 12 months in a year. Consider all possible invalid months,
days, and years for input and write code to handle them. The function,
date_time_parser, should return nothing.
Your solution need only include the implementation of the function, though you should
test your function fully and for a variety of inputs.
PLEASE USE BASIC PYTHON AND READ WHAT THE PORBLEM

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!