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

Re: 6.00 Handout, Lecture 2 http://tinyurl.com/q35p8dy The handout has the following code: '''' if x < y: if x < z: print 'x is least' else: print 'z is least' else: print 'y is least' ''' why is else: y is least ? if x = 3 y = 2 z = 1 z is the least

OpenStudy (anonymous):

Write after the code I post, is the following: ''' if x < y: if x < z: print 'x is least' else: print 'z is least' elif y < z: print 'y is least' ''' Which does make sense and later in the code it addresses if z is the least.

OpenStudy (anonymous):

To clarify, the difference between the command in the 1st post and 2nd post is ese vs. elif respectively.

OpenStudy (anonymous):

The handout has the correct code boxed in a rectangle

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!