• Register
0 votes

Problem :

I'm new to python and I've been struggling with this problem for a while. I've search google and youtube but no luck so far. I've written this in IDLE 2.6.5. If someone could tell me why I'm getting the can't multiply sequence by non-int of type float error.
6 5 3
6,930 points

1 Answer

0 votes


The can't multiply sequence by non-int of type 'float' error was because the input taken in the text-box is a string. 

#c = self.input.GetValue()#

the value is still a string. Therefore, that value in c has to be converted, in this case to a float type:

#c = float(c)#

so Python can process it as part of the equation:
#c = 9.0/5.0 * c + 32#

Further Readings:


9 7 4
38,600 points

Related questions

0 votes
2 answers 141 views
Problem : While submitting the Python program i am getting below error python can't multiply sequence by non-int of type 'float'
asked Oct 22, 2019 peterlaw 6.9k points
1 vote
1 answer 167 views
Problem: Hello all, I am trying to play with python and completed writing a code. My codes are supposed to create a new note. Unfortunately, I messed up something in the script and it’s not working as I expected. Find my sample script snippet below and have a look ... . So, in the end I am posting here to get responses from you guys. Thanks for your valuable time. I must recognize your help.
asked Apr 26 Gavin 15.3k points
0 votes
0 answers 5 views
Using pip install for any module apparently on my Ubuntu 16.04 system with python 2.7.11+ throws this error: TypeError: unsupported operand type(s) for -=: 'Retry' and 'int' What is wrong with pip? How could I reinstall it, if necessary? Update: Full traceback is below ... File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/util/retry.py", line 228, in increment total -= 1
asked Oct 24 psandprop 2.4k points
1 vote
1 answer 63 views
Problem : I am a student and I am trying to learn python. I like programming so trying my hand on Python but the code which I have written in Python is giving me very strange looking error shown as below for your reference. Error: unsupported operand type(s) for ... array1=[1,2,3,4,5]; encryptedArray=runEncrypt(array1,4); print(encryptedArray); Please guide me in fixing my above error in Python.
asked May 15 Martin K 6.6k points