Ask
your own question, for FREE!

MIT 6.00 Intro Computer Science (OCW)

OpenStudy (anonymous):

why doesn't python 2.7.1 say 'even' or 'odd' like it does in lecture 2 when i try to run it?

Still Need Help?

Join the QuestionCove community and study together with friends!

OpenStudy (anonymous):

I typed this in to another window: x=15 if (x/2)*2 == x: print 'even' else: print 'odd' and hit 'run in python shell' and it's not doing anything. i feel like an idiot. someone help me!

OpenStudy (anonymous):

nevermind, I understand now that you have to 'run module', but it says that "else" is a syntax error? wtf? is "else" not used in this version?

OpenStudy (shadowfiend):

else should be indented at the same level as if: if (x / 2) * 2 == x: print 'even' else: print 'odd'

OpenStudy (anonymous):

hi I am new to computer programming. How is python to start with?

OpenStudy (python):

it is the best language to start learning computer programming, because it is soo simple

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!

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

Latest Questions

owenjiang:
determine whether the graph represents a proportional relationship

1 minute ago
0 Replies
0 Medals

ToxicaDennisIce:
Which number completes the inequality? 1.01 less-than blank less-than 1.17, less-than 1.

3 seconds ago
10 Replies
0 Medals

yesno:
um, sorry for asking for so much help but... can i get more? if so, thanks. QUESTION 4 At the pet fair, there are 42 dogs and 35 cats.

1 minute ago
10 Replies
2 Medals

yesno:
Omariyah, you can still work on the question. if you need it again here it is. QUESTION 1 Find the GCF of the numbers.

9 minutes ago
4 Replies
0 Medals

ToxicaDennisIce:
Which list correctly orders A, B, and C from least to greatest when A = StartAbso

10 minutes ago
12 Replies
0 Medals

supie:
Find the x-intercept of the rational function. A rational function is graphed in the second quadrant, and in the first, third and fourth quadrants are other

13 minutes ago
6 Replies
2 Medals

yesno:
help? Find the GCF of the numbers. 50, 40 A. Make sure to include both factor lists to show how you arrived at your answer (your work).

11 minutes ago
74 Replies
4 Medals

ToxicaDennisIce:
Which represents the value of Point C on the number line? A number line has points blank, A, negative 2, B, 0, C, 2, blank, D.

18 minutes ago
4 Replies
0 Medals

Meme69420:
Which existing technology did engineers use to enhance the speed of propeller-dri

11 minutes ago
12 Replies
1 Medal