Question: in python code Write a function called isSubset() that receives two integers and returns if any of them is a subset of the other. An

in python code Write a function called isSubset() that receives two integers and returns if any of them is a subset of the other. An integer is said to be a subset of the other if every digit in the first appears somewhere in the second. The function returns 1 if the first is a subset of the second, 2 if the second is a subset of the first and 0 if both are subset of the other. If none of them is a subset of the other, then the function returns -1. For example: isSubset(124, 24) returns 2 isSubset(124, 4120) return 1 isSubset(240, 124) returns -1 isSubset(124, 421) returns 0 isSubset(112233, 1234) returns 1

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!