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 UPHAVE A GREAT DAY. please dont use too many condtionals as they dont want us to write as much code so less than lines please. thank you
Question hwqpy:
Write a function named datetimeparser that takes as input a string that represents
the date and time hour clock in the following format: HR: MIN:SEC MMDDYYYY
and prints the following:
DDMMYY
HR:MIN:SEC
MMYYYY
Whether the time is AM or PM
Validation of the input in the function is necessary. In fact, write a second function,
named inputisvalid, 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 :: the given string is
invalid, as there can be only months in a year. Consider all possible invalid months,
days, and years for input and write code to handle them. The function,
datetimeparser, 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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
