SyntaxFix
Write A Post
Hire A Developer
Questions
Instead of ((t[1])/length) * t[1] += string, you should use string += ((t[1])/length) * t[1]. (The other syntax issue - int is not iterable - will be your exercise to figure out.)
((t[1])/length) * t[1] += string
string += ((t[1])/length) * t[1]
int is not iterable