Question: Hello, I need help finishing up my program (code below). I need to create a function that gets the value from the function day() and

Hello, I need help finishing up my program (code below). I need to create a function that gets the value from the function day() and returns the date in the format 2/22/2050.

I have already created the function to get the value from the user. Just need another function to format the values entered to the correct date format. Please use Python, and add screenshots. Thank you.

def day():

"""Get the value from the user"""

day = input("Please enter the day ")

day_ok = False

while not day_ok:

day_ok = validate_value(day)

if not day_ok:

day = input("The value was invalid please enter again")

day_ok = validate_value(day)

return day

def validate_value(passed_value):

"""Validate weather or not the value entered is numeric"""

if passed_value:

if passed_value.isnumeric():

return True

else:

return False

else:

return False

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 Databases Questions!