Question: please use python and show test cases. 3. Function One: whatTypes Specification The first function you will write should be called 'whatTypea. Your function should

please use python and show test cases.  please use python and show test cases. 3. Function One: whatTypes

3. Function One: whatTypes Specification The first function you will write should be called 'whatTypea". Your function should take one (1) argument, a list. The function should return one (1) list containing the data types of each of the members of the list passed to the function. To obtain the data type, use the built-in type function discussed in class. Your return list should contain the entire output of the type function for each element. For example if you call: type('a'), you will receive as output. This is what you would place in your list. Make sure to maintain the proper ordering, so that the zeroth element of your return list corresponds to the zeroth element of the input list, etc. Page 2 of 3 Yesterday, 9:20:18 PM CS 105-Intro to Computing Non-Tech Spring 2018 est what Types(['a'. 2, 4.3] returns cclass str'>, cclass 'int'>,1 4. Function Two: cardType Spacfication The second function you will write should be caled 'cardType'. Your function should take one (1) argument, an integer representing a card type. The function should return one (1) string. The return string should contain one of three possible values: Visa, Mastercard. 'Discover Card. The value should be determined according to the following rules. Credit card numbers follow a standard system. For example, Visa, MasterCard, and Discover Card all have 16 digits, and the first digit serves to indicate the card brand. All Visa cards start with a 4; MasterCard cards always starts with a 5, and Discover cards start with a 6. For this lab, you may assume your function will only be passed a 4, 5, or 6 Testing: Create your own test cases

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!