Your code looks promising, but I think there's a mistake (I mean not the mistake, might be typing mistake) in this line,
b = int(raw_input(("rating",c)))
So make it,
b = int(raw_input("rating," c))
And still it is not working then, give a try try with this,
b = int(input("rating", c))
-KR