Shell vs. Editor

  Рет қаралды 269,092

MIT OpenCourseWare

MIT OpenCourseWare

7 жыл бұрын

MIT 6.0001 Introduction to Computer Science and Programming in Python, Fall 2016
View the complete course: ocw.mit.edu/6-0001F16
Instructor: Dr. Ana Bell
This in-class question explains the difference between the IDLE python environment and the shell.
License: Creative Commons BY-NC-SA
More information at ocw.mit.edu/terms
More courses at ocw.mit.edu

Пікірлер: 38
@inafridge8573
@inafridge8573 4 жыл бұрын
Wait I thought this would compare using a shell vs using an editor but that didn't happen
@deftrascal1626
@deftrascal1626 3 жыл бұрын
Yeah I really don’t understand how the title relates at all
@aligokalptopsakal4279
@aligokalptopsakal4279 3 жыл бұрын
​@@deftrascal1626 If you type the code in the lecture on Python Shell, it will first return the type of 5, and then the calculation in the print function. However, if you type the same code on an IDE, it will only return the calculation in the print function. One must use the print function to print something on an IDE, whereas there is no such necessity on a Shell. The code that is typed on a Shell is executed directly. I think she meant to explain this difference. I've come here to find out why this happens, but I am disappointed too.
@DaCurse0
@DaCurse0 Жыл бұрын
@@aligokalptopsakal4279 The term shell is incorrect here, the IDE also runs your program in a shell technically. The correct term is a REPL. When running the python command without any arguments or when using something like IDLE you get a REPL - it reads and executes a single line of input and it prints whatever the last statement in that line evaluates to. This is why it shows you that the type function return int. When running a file with the python command, which is essentially what your IDE does, the only way to observe any output is by means of performing side effects. One such side effect is writing to the standard output. In a shell (like command prompt, or bash) you will see everything the program printed to it's standard output, IDEs also either use a shell internally or emulate one by reading the processes' standard output and displaying it to you. Since you are most likely running your REPL in a shell (by starting up python in command prompt or bash) you will also see that print is outputting to the screen as well.
@learning_with_irving4266
@learning_with_irving4266 8 ай бұрын
Beautiful, the way the 0s and 1s map out our simulation
@akbarrauf2741
@akbarrauf2741 7 жыл бұрын
thank you ,mit
@ferhatboy78
@ferhatboy78 5 жыл бұрын
thanks a lot. very helpful course. simple and well.
@PartScavenger
@PartScavenger 4 жыл бұрын
"75 percent of the people got it right, Perfect"
@jikachu926
@jikachu926 4 жыл бұрын
LOL HER FACE BEFORE SHE SAID PERFECT
@muhammadsarfraz2953
@muhammadsarfraz2953 3 жыл бұрын
thank you mit. its really helpful for me because i am studying economics in university and i want to change my program to computer science so i really get help from mit who already giving me information about programming
@NadidLinchestein
@NadidLinchestein 6 ай бұрын
How's it going now?
@brianeastlick7293
@brianeastlick7293 2 жыл бұрын
Amazing teacher ❤️
@brainstormingsharing1309
@brainstormingsharing1309 3 жыл бұрын
Absolutely well done and definitely keep it up!!! 👍👍👍👍👍
@PhoebeJCPSkunccMDsImagitorium
@PhoebeJCPSkunccMDsImagitorium 2 жыл бұрын
This professor is one of those CS profs with ur best interests at heart that annoyingly wants you to learn everything yourself (but as a freshman/sophomore noone understands that you can only learn how to program on your own)
@lepidoptera9337
@lepidoptera9337 Жыл бұрын
Dude, if you are entering CS as a computer newbie, then you are the one idiot in the class who deserves to be washed out.
@juliannevillecorrea
@juliannevillecorrea 5 жыл бұрын
thank you !
@abdullahdarr9163
@abdullahdarr9163 5 жыл бұрын
there was not a lot about the two differences
@elvissanchez2703
@elvissanchez2703 4 жыл бұрын
Thank you! :)
@rizvicomputercodes3968
@rizvicomputercodes3968 3 жыл бұрын
Why the lec is so small is this is any kind of demo class
@muhammadsarfraz2953
@muhammadsarfraz2953 3 жыл бұрын
nope they only cut the video to explain about shell vs editor
@drmustache5637
@drmustache5637 Жыл бұрын
Good video
@batman9937
@batman9937 7 жыл бұрын
Annabelle 😂😄😄😃
@florroman1273
@florroman1273 Жыл бұрын
Soooo.. what is the diferente between shell and editor?
@mitocw
@mitocw Жыл бұрын
The Python shell is the interactive console. You can enter single commands, and classes and functions into the shell, although you can’t save your code from the shell. Commands entered are executed immediately. An editor allows you save edit and save text files, which can be run later.
@florroman1273
@florroman1273 Жыл бұрын
@@mitocw thank youuuuuui!@!
@Clyffcarlock1
@Clyffcarlock1 3 жыл бұрын
I thought type(5) would show 5 as a "int"...integer...
@MrTweetyhack
@MrTweetyhack 9 ай бұрын
it does. her editor is broken because she's using Windows
@muhammadsarfraz2953
@muhammadsarfraz2953 3 жыл бұрын
hy anybody can tell me which software we have to choose to console the programming for python and from where can i download it
@mitocw
@mitocw 3 жыл бұрын
The course was designed for Python 3.5. Many courses recommend installing the Anaconda distribution: www.anaconda.com/products/individual
@ajaykumbhar6919
@ajaykumbhar6919 3 жыл бұрын
@@mitocw It's great to see you're replying to recent comments. Keep up the good work :)
@stereoheart.806
@stereoheart.806 Жыл бұрын
😄
@smileyface3188
@smileyface3188 Жыл бұрын
Annabelle 😂😄😄😃
@smileyface3188
@smileyface3188 Жыл бұрын
Annabelle 😂😄😄😃
Python vs. Math
1:37
MIT OpenCourseWare
Рет қаралды 245 М.
2. Branching and Iteration
43:31
MIT OpenCourseWare
Рет қаралды 564 М.
La revancha 😱
00:55
Juan De Dios Pantoja 2
Рет қаралды 35 МЛН
DELETE TOXICITY = 5 LEGENDARY STARR DROPS!
02:20
Brawl Stars
Рет қаралды 15 МЛН
ИРИНА КАЙРАТОВНА - АЙДАХАР (БЕКА) [MV]
02:51
ГОСТ ENTERTAINMENT
Рет қаралды 1,1 МЛН
3. String Manipulation, Guess and Check, Approximations, Bisection
45:02
MIT OpenCourseWare
Рет қаралды 369 М.
8. Object Oriented Programming
41:44
MIT OpenCourseWare
Рет қаралды 608 М.
GraphQL vs REST: Which is Better for APIs?
7:31
IBM Technology
Рет қаралды 183 М.
Bash in 100 Seconds
2:33
Fireship
Рет қаралды 1,4 МЛН
1. What is Computation?
43:06
MIT OpenCourseWare
Рет қаралды 1,8 МЛН
Git Version Control _final_new_final.new - Computerphile
6:58
Computerphile
Рет қаралды 60 М.
7. Testing, Debugging, Exceptions, and Assertions
41:33
MIT OpenCourseWare
Рет қаралды 177 М.
What is MLOps?
6:55
IBM Technology
Рет қаралды 57 М.
10. Understanding Program Efficiency, Part 1
51:26
MIT OpenCourseWare
Рет қаралды 232 М.