Hey all once again how would you create a function called
For any invalid input, return string Invalid input
Example: For number 5 return string
i may have found a possible solution
binary_converter. Inside the function, implement an algorithm to convert decimal numbers between
0 and 255to their binary equivalents.
For any invalid input, return string Invalid input
Example: For number 5 return string
101
i may have found a possible solution
def convertToBinary(n): """Function to print binary number for the input decimal using recursion""" if n > 1: convertToBinary(n//2) print(n % 2,end = '') # decimal number dec = 34 convertToBinary(dec)