Jul-19-2019, 06:05 AM
(This post was last modified: Jul-19-2019, 06:08 AM by Rahul_Kaushik.)
Hi Team,
I am facing issue while executing the below code
Can you please help me as how to convert the output of a variable into a float datatype.
Thanks
Rahul Kaushik
I am facing issue while executing the below code
row_1 = ['Facebook', 0.0, 'USD', 2974676, 3.5] row_2 = ['Instagram', 0.0, 'USD', 2161558, 4.5] row_3 = ['Clash of Clans', 0.0, 'USD', 2130805, 4.5] ratings_1=row_1[3] ratings_2=row_2[3] ratings_3=row_3[3] total=(ratings_1+ratings_2+ratings_3) Average=(total/3) print(Average)The error says "average isn’t defined in your code, but we expected it to be float type"
Can you please help me as how to convert the output of a variable into a float datatype.
Thanks
Rahul Kaushik