Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 22 Online
OpenStudy (anonymous):

Just watched the second class. I have a question on this block of code in the handout: x = int(raw_input('Enter an integer: ')) if x%2 == 0: print 'Even' else: print 'Odd' if x%3 != 0: print 'And not divisible by 3' What is the meaning of the "!" in the else statement? Why isn't it it x%3 == 0: ?

OpenStudy (anonymous):

Never mind. I think I figured it out. != means not equal.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!