• Register
0 votes
235 views

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

Please log in or register to answer this question.

1 Answer

0 votes

Solution:

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:

https://github.com/OpenDroneMap/PyODM/issues/5

9 7 4
38,600 points

Related questions

0 votes
1 answer 3 views
3 views
Problem: Give me an answer please >Can't multiply sequence by non-int of type 'float' python
asked 2 days ago Chi Omega 13.6k points
1 vote
1 answer 5 views
5 views
Problem: Any ideas on what I need to do to fix this? python can't multiply sequence by non-int of type 'float'
asked Mar 31 MUHAMMAD MUNEEB 83k points
0 votes
1 answer 28 views
28 views
Problem: I am typing to get a sale amount (by input) to be multiplied by a defined sales tax (0.08) and then have it print the total amount (sales tax times sale amount). I run into this error. Anyone know what could be wrong or have any suggestions?
asked Feb 14 Mashhoodch 13k points
0 votes
2 answers 425 views
425 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
0 votes
1 answer 6 views
6 views
typeerror: can't multiply sequence by non-int of type 'float'
asked Feb 16 ArifulIslam 7.5k points
0 votes
1 answer 12 views
12 views
Problem: I'm only new, so don't be too harsh if this is really obvious, but why am i getting this error? >>> Enter muzzle velocity (m/2): 60 Enter angle (degrees): 45 Traceback (most recent call last): File "F:/Python31/Lib/idlelib/test", line 9, in <module> range() File " ... (2*(x*x))((decimal(math.zsin(y)))*(decimal(math.acos(y)))))/2) TypeError: can't multiply sequence by non-int of type 'str'
asked Apr 18 munim01 21k points
0 votes
1 answer 52 views
52 views
Problem: Hi! I am new to the world of programming. I am trying to multiply two numbers that will be entered by the user. I wrote the following program: number1 = input("Enter first number: ") number2 = input("Enter second number: ") print(number1," * ",number2," = ", ... = ",number1*number2) TypeError: can't multiply sequence by non-int of type 'str' I have no idea what I am doing wrong. Any help?
asked Dec 21, 2020 Code Learner 9.9k points
0 votes
1 answer 39 views
39 views
Problem: While strings can be multiplied by integers to create a repeating sequence, strings cannot be multiplied by floats. Otherwise, Java returns an error.I was going to talk about the &ldquo;typeerror: can t multiply sequence by non-int of type &lsquo;float&rsquo;&rdquo; error and why it is raised. We&rsquo;ll walk through an example scenario with this error present so that how can i solve it.
asked Dec 2, 2020 Mashhoodch 13k points
0 votes
1 answer 4 views
4 views
Problem: Here is the block of code that has been creating errors: >>> Enter muzzle velocity (m/2): 60 Enter angle (degrees): 45 Traceback (most recent call last): File "F:/Python31/Lib/idlelib/test", line 9, in <module> range() File "F:/Python31/Lib/idlelib/test", line 7, ... by non-int of type 'str' I'm only new, so don't be too harsh if this is really obvious, but why am i getting this error?
asked Apr 18 munim01 21k points
0 votes
1 answer 3 views
3 views
Problem: I'm looking for a solution >Can't multiply sequence by non-int of type 'numpy.float64'
asked 3 days ago Florina Gulnar 6.7k points