Quote (carteblanche @ Feb 12 2013 09:33pm)
considering the hints, i'm guessing 1 line to set up the mapping, 1 line to get input, 1 line to produce output. if you dont need if statements, then your mapping must move from int -> letter grade. sounds like an array is good for that.
eg:
mapping = ['F', 'F', ....., 'D', 'D', 'D', ..... , 'A', 'A', 'A' ...]
score = cast_int(raw_input("enter grade 0-100"));
print mapping[score]
where your array is constructed in such a way that indexes 0 to 64 returns F, 65-69 D, etc etc.
of course that would fail if they enter invalid input (eg: 33.3, 101, "blahblah", -11, etc)
Wow.. Thank you so much. Yet again, I was looking too far into the problem. I like your solution. Not so elegant, but definitely pretty simple.
Thanks again!