Quote:
Originally Posted by SuperSlowSS you suck at logic. drop it now. lol |
That's actually good advice. If you can't even get a B in this CMPT 120, it only gets harder from there. Next is CMPT 125, 225, 275. Make sure you have Cukierman as your prof for 125. CMPT 225 and 275 is basically hell. If you do happen to do well in this course, take CMPT 165 and own all the art majors who don't know what python is.
Anyways, looking at your previous post, it looks like your algorithm is wrong in the second half. There should only be 6 'print' statements b/c there are only 6 possible ways to arrange the names (which you have listed out) assuming the names can't be exactly the same as each other. So your algorithm should be
If name1 before name2
..if name2 before name3
....print "name1, name2, name3"
..elif name1 before name3
....print "name1, name3, name2"
..else
....print "name3, name1, name2"
else //at this point, name2 is before name1
..if name3 before name2
....print "name3, name 2, name1"
..elif name3 before name1
....print "name2, name3, name1"
..else
....print "name2, name1, name3"