So I have a program that takes one argument, an integer num. It is supposed to return a number that repeats the digits of num 3 times. If the argument is not an integer, the function should return None.
For example:
For input argument "hello!", it should return None, because the input argument is a string.
For input argument "23", it should return None, because the input argument is a string. .
For input argument 12.34, it should return None, because the input argument is a float. .
For input argument 1, it should return 111 or argument 241, it should return 241241241.
I don't know what I'm doing wrong in mine, any help would be appreciated!
def repeat_number(num):
if num is type(str) and type(float):
return None
else:
return str(num) * 3