1. Write a function called getName(). The purpose of the function is to ask the user for the user’s name, and return the name as a return value. There are no parameters to this function.2. Write a...

1. Write a function called getName(). The purpose of the function is to ask the user for the user’s name, and return the name as a return value. There are no parameters to this function.2. Write a function called getBirthdate(). The purpose of the function is to ask the user for the user’s birth date. The return value is an appropriately formatted date. There are no parameter s to this function. The important part of this function is to make sure the data input is valid. (Hint: you could ask the user for the month, day and year separately so you can make sure the input is valid.)3. Write a function called age() that takes a properly formatted date as a parameter, and calculates the number of years from that date to today’s date. Only the age in years is returned as an integer. (Hint: the properly formatted date would be the output from getBirthdate().)4. Put all three of the functions in a module called myUtilities.5. Write a program to demonstrate how you import the module, and test the functions in that module.
Dec 06, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here