Multiplying floats in python -


In my Python Code I search for a specific format that floats again, i.e.

 . (Data ',' P '): Float (Data Enhanced [6]),' PE ': Float {Data ID: Int (Datinigud [0],' MIDx ': Int (Data Enabled [2]) - 1, Phase ': float (Datinugud [8]),' E ': Float (Datinugud [9]),' M ': Float (Datinagad [10])}  

I want to do some line

  'Pt.': Math.sqrt (float (datinigud [6] * data enzad [6]) + float (datainjud [7] * data engine [7]))  

but this returns

  'Pt.': Math.sqrt (float (dataynge [6] * data engined [6]) + Flow T (DataINgood [7] * DataIngeud [7])}} Type Error: 'str'  

Can not multiply the sequence by non-intittance of any kind?

thanks

Because dataINGood is a String list . You must change the values ​​in float :

 : 'pt': math.sqrt (float Data Engine [6]) * Float (DataInd [[6]) + Float (Dataindex [7]) * Float (Dataindex [7])  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -