0
alpha = 0.5;  # Contrast control

name = input('Your name: ')
print('Hello,', name)
#input = float(input("Enter alpha [0.0-1.0]: "))

# # We use the alpha provided by the user if it is between 0 and 1
# if( input >= 0, input <= 1 ):
#       alpha = input; 

betax = 1 - alpha; # Brightness control

This is the error i'm getting:

TypeError                                 Traceback (most recent call last)
<ipython-input-28-b7a9133002e1> in <module>()
      3 alpha = 0.5;  # Contrast control
      4 
----> 5 name = input('Your name: ')
      6 print('Hello,', name)
      7 #input = float(input("Enter alpha [0.0-1.0]: "))

TypeError: 'float' object is not callable

I have no idea why this doesn't work. I'm working in google colab btw. It's a really weird situation because the code on line 7 works once, but then when I run it again I get the same error. This happened multiple times so I tried copying an example code for inputting and I'm getting the same error, yet this exact same code works in other notebooks. Also the code on line 7 works without problems on my classmate's computer. What am I doing wrong?

0 Answers0