0
num =  int(input("enter num ")) 
if num <=0:
   output= abs(num)   
   print(output)  
else:
   output =abs(num)   
   print(output)
TypeError                                 Traceback (most recent call last)
<ipython-input-54-aba2c4ff0eb3> in <module>
      3 INPUT: -1        OUTPUT: 1"""
      4 
----> 5 num =  int(input("enter num "))
      6 
      7 

TypeError: 'int' object is not callable
2
  • 2
    Your error is not reproducible from your code. If you are working inside a Jupyter notebook or typing commands into the console, make sure to perform a clean restart of the environment. It's possible that you assigned a number to the variable int, therefore overwriting the int function itself. Commented Nov 28, 2022 at 2:26
  • So, did you handle the problem? The question is kinda hanging out here.
    – tdelaney
    Commented Nov 28, 2022 at 2:49

1 Answer 1

1
num = int(input("enter num ")) 

output = abs(num)   
print(output) 

Not the answer you're looking for? Browse other questions tagged or ask your own question.