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

hello guys, my IDLE shows a syntax error when I press the enter key after typing the 'else:' conditional statement. Please kindly assist me on this.

OpenStudy (turingtest):

could you post your code with a screenshot or something?

OpenStudy (anonymous):

Thanks buddy, have found a way around it. It had to do with indentation. However,kindly assist with this question: Write a program that examines three variables-x,y, and z- and prints the largest odd number among them. If none of them are odd, it should print a message to that effect.

OpenStudy (turingtest):

you can use the modulo operator % to test for even/odd. You can then use a combination of conditional statements that resemble the following pseudocode //initiate variable for largest even number so far (I'll call it "big") to None //if x is even, store its value in big //else if y is even and greater than big //update big to store y //else if z is even and greater than big //update big to store z //return big

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!
Latest Questions
Arriyanalol: i need help
1 day ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
1 day ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
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!