You can see the keyboard shortcut also being displayed just adjacent to the comment uncomment option under the edit menu. Like I earlier said you can add description to your code to make it more comprehensible, but apart from just making it incomprehensible if you are in the beginning stage of developing a code where you are trying and testing out of you think then you can also use commenting as a way of making a few lines inert.
(Refer Slide Time: 06:58) So, what do I mean by this is that. So, let us take the previous example where I say a is 14, b is 8 times 10 and print a comma b. Now I am just trying and testing out and seeing what will happen if I just comment a. So, I am basically just making the first line inert and then running the successive lines. Now, if you are playing with your code and you are in the developing stage then you can also use commenting as a way of keeping lines inert. So, now this is another use of committing. So, till now we seen how to execute an entire file at once and how to execute few lines of course, we have also looked at commenting as a way of adding description to your code. Now let us see how to clear the console and the environment.
(Refer Slide Time: 07:43) If you have an overpopulated console where you have printed multiple lines of codes and multiple outputs; then you might also want to just clear it off and start a fresh. So, let us take this example where I have run the codes; I have the same codes as earlier and I am just running them. So, this is how my console looks right now; now if I want to clear it. So, you can type percentage clear in the console and once you hit enter, your entire console is clear. Now, an alternate ways to use the control plus l shortcut from the keyboard that will also work; so this is to clear the console. (Refer Slide Time: 08:24)
Now, once you clear the console this is how it looks; I have snapshot here that tells you how does the console look once you clear it. An important point to note here is that; so whenever I clear my console only the output windows cleared the variable explorer still remains intact all the variables are still there; so, clearing a console only means that you are just clearing or flushing out the output window. So, now let us see instead of just clearing the console is there a way to just clear the environment as well. (Refer Slide Time: 08:57) So, I might also be interested in removing or deleting a few variables from my environment. So to begin with I have two variables in my environment which is a and b and they have a value of 14 and 140 respectively. So, let us see how to remove or delete these variables.
(Refer Slide Time: 09:15) Now, to remove a single variable; you can just give del space followed by the variable name. Now this you can type in the console; so del stands for delete and it has to be followed by a space and then a variable name. Now, once you hit enter what you will see is that one of the variables in this case b has been removed from the environment. So, here you can see variable b has been removed from the environment. Now, instead of
- Summer '20
Other Related Materials
- A single IR line can be used to serve n devices Figure 46 All devices are
- Presidency University
- CSE 123A - Spring 2020
- For now add a little if post return pp check before returning the JSX import
- Southeast University, Bangladesh
- CSE 123A - Summer 2020
- These commands simply take the colour image of a circuit board the image
- Bangor University
- COMPUTER 123A - Spring 2020
- Linyee Yuan X Pollination of Streetwear Theme no 8 Winter 2007
- Central University
- BIO 123A - Spring 2020
Mason, Matt - The Pirate's Dilemma.pdf
- Let us start by verifying that Python is installed by checking the version of
- Seneca College
- INFORMATIC 123A - Summer 2020