write a program that gets a score from a player and rates it based on the following given a score 0-999,the program should display message 'nothing to brag about' 1000-9999 display message 'good score' if score is over 9999 the program should display the message 'very impressive' if score is a negative number,the program should display the message 'that's not a legal score' and here is how I tried it score=(raw_input("enter your score")) if score>=0 and score<=999 print nothing to brag about elif score>=1000 and score<=9999 print 'good score' elif score>=9999 print 'very impressive' else: print 'that's not a le gal score'

raw_input() returns a string value, so you have to convert it into an integer. Your code should look something like this ...

score = int(raw_input("Enter your score (0 to >9999): "))

if score>=0 and score<=999:
    print "nothing to brag about"
elif score>=1000 and score<=9999:
    print "good score"
elif score>=9999:
    print "very impressive"
    print "that's not a legal score"
This question has already been answered. Start a new discussion instead.