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
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
Math,
1 day ago
Math,
1 day ago
Chemistry,
3 days ago
Computer Science,
8 months ago
English,
8 months ago