Skip to main content

Opening Python

How to get started with the default CPython distribution




Step 1: Download and install the python(3.x) from the provided link:


                    https://www.python.org/downloads/


Step 2: Click on windows logo to open the start menu.






Step 3: Now from there in Python(3.x) folder, click on Python idle.



You can see a window of Python(3.x) idle pops up.



Note: There are two modes of working in Python(3.x) idle:


1. Interactive mode: Here, you don’t have to save any python file unnecessarily in order to run it. The user can type the code directly in the idle and the output of the code would be given instantly.


2. Script mode: In script mode, the whole program is written using a number of codes and then saved in an appropriate file which is then run. Here, at last the program generally gets converted into an ‘.exe’ file.



Step I: Move your cursor to the top left corner of the idle box, there click on the File option, a drop down menu opens up. There click on New File option.




A new python file will open up in a separate window.




Step II: After then, we should rename the file and save it. If you want you can even do this step at last. For this, move your cursor to the top left corner of the box and click on File menu, a dropdown menu will popup. In the dropdown menu, click on the Save option. Give a name and add .py extension at the end and then save it.





Step III: After that, write the code of the program you want to make and then press Ctrl + S so as to save the code.


Step IV: Then click, on the Run menu and then select Run module or simply click F5 so as to run the code.






The End



©SGPython

Comments

Popular posts from this blog

Type-Casting And Dynamic-Typing

Python is equipped with some of the amazing and easy to use methods which are already built-in keeping the ease of understanding and fun-to-learn. Some of these amazing properties are going to be discussed today in the blog. Type-Casting Typecasting is one of the simple topics of Python which which is very much easy to understand yet is very efficient in the day-to-day lives of Python programmers. Def:  The explicit conversion of an operand to a specific type is called  typecasting. Explicit conversion refers to the type of conversion of datatype into which the user wants to change his or her expression into. Note that these types of conversion are user defined. Typecasting in Python can be explained as follows:                         <datatype> (expression) where <datatype> refers to the datatype into which the user wants to type-cast. Example:  When we use input() function, Python alwa...

Factorial of a Number by a User-Defined Function (PCTS)

 Factorial of a Number There are a number of ways to find the factorial of a number (obviously, it going to a whole number 😆). Out of all of them today, I'm going to show you the user-defined code I created to find the factorial of any whole number. Trust me, it's cool 😎 just give it a try...

For Loops

 The for loop By  polygraphus  on  shutterstock Def: The for loop is also known as the counting loop and is designed to process the items of any sequence, such as a list or a string, one by one. General form of for loop: The general form of the for loop is given below:      for <variable> in <sequence>:          statements to repeat