BestPromptFinderBelow is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Modify the following Python code to raise an exception if the input value is not an integer ### Input: def square_root(x): return x**0.5 ### Output: def square_root(x): if not isinstance(x, int): raise TypeError('Input must be an integer') return x**0.5
Find similar in the app →