Computer Science, asked by minasharma8439, 3 days ago

Write a function named only_ints that takes two parameters. Your function should return True if both parameters are integers, and False otherwise.
For example, calling only_ints(1, 2) should return True, while calling only_ints("a", 1) should return False.

Answers

Answered by samarthkrv
0

Answer:

def only_ints(a,b):

   if(type(a) == "<class 'int'>" and type(b) == "<class 'int'>"):

       return True

   return False

print(only_ints(5,6))

Explanation:

Similar questions