• Register
search
Log In
0 votes
171 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.9k points

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

36.1k points
edited by

Related questions

0 votes
2 answers 52 views
52 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 37 views
37 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 14.9k points
1 vote
1 answer 22 views
22 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
1 vote
1 answer 54 views
54 views
Problem: Hi all This is a question from a noob who started coding a few hours back. print("Hello") print("name") print("hello") print("Let's do some math!") print(5 + "a") print("5 + 5") print("Thanks for playing along!") It says, “typeerror: unsupported operand type(s) for +: 'int' and 'str'” What does it mean?
asked Mar 9 Gavin 14.9k points
1 vote
1 answer 25 views
25 views
Problem: For the following code import re import string import pandas as pd import openpyxl import glob import csv import os import xlsxwriter import numpy as np keywords = {"oracles","mining","ico"} df = pd.read_csv(r"C:MYfile.csv", error_bad_lines=False) sep="," , ... j in df.columns] 21 TypeError: argument of type 'float' is not iterable Can anyone sortout the problem and help me to solve this?
asked Apr 26 samhaz 5k points