The following content is provided under a Creative
Commons license.
Your support will help MIT OpenCourseWare
continue to offer high-quality educational resources for free.
To make a donation or view additional materials
from hundreds of MIT courses, visit MIT OpenCourseWare
at ocw.mit.edu.
ANA BELL: So the question was, if you have these two lines
right here-- which I'll just put them up here just
so it's bigger-- type(5), print(3.0-1),
what is going to be the output, so if I run this in the editor?
So for these types of problems, you can always check yourself.
And this comes back to, if you're new to programming,
don't be afraid to try it out.
Don't ask me.
Don't ask your neighbor.
Just type it into the shell and hit Run.
And then you get to see what the answer is.
So the answer to this question is going to be 2.0.
And let's see, are we right?
Yeah, great.
75% of the people got it right.
Perfect.
So if you didn't get it right, just to explain again,
the reason why this doesn't get printed out
is because we never actually had a print statement.
So if you want to show something to the console,
you need to use a print statement.