Why do I get this error message

python

#1

How do I solve this:
Type error: can’t multiply sequence by non-int of type 'float’
incorrect code: reading_score = (float(4.71 * [‘characters’] / [‘words’] + 0.5 [‘number_of_words’] / [‘sentences’] - 21.43))
print(reading_score)


#2

That is a non-numeric expression. We cannot divide a list by a list.

characters / words

is a numeric expression IF both characters and words are numbers.

Same applies to the second part of your expression.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.