20th Jun Python Notes
20th Jun Python Notes
-----------------------------------------
visit the website:
www.python.org
there find downloads select windows there
now download the version name windows installer
once the download starts we need wait until it gets completed
after completing it we need to install python in our machine
inorder to install click on the downloaded python file then click on run
there we need to check the 2 boxes in the first page with add manual path to python
then we need to click next,next and so on install then after few seconds our python
]
will be installed in our computer
---------------------------------------------
how do i create a python file
--------------------------------------------
1. open notepad, then type your python code there
2. save the file with extension .py
that's it our python file is ready
---------------------------------------------
how to execute this python file in my computer
------------------------------------------------
1.in order to run my python file what do we need?
we need to have something called cmd in our laptop or computer
cmd is located in windows type cmd or terminal
shorcut to open cmd
click on the tab bar
type cmd
then we need to type smthg?
we need to type python3 testing.py
output will be viewed in the cmd terminal
------------------------------------------------
how do we install vscode in windows?
------------------------------------------------
open browser and search for vs code there you could see many link
click on code.visualstudio.com
click on downloads on top right
then click on your respectes os then click on downlaod
your vs code will be downloaded now open that file inorder to install it
---------------------------------------------------
open that downloaded file then it will ask you to start procedure
we need to click on next,next,next if they ask for any permission or accept the
policy we need to agree on them
it ll take few seconds to install vs code in your computer
----------------------------------------------------
for the very first time inorder to run vs code we need to setup some programs:
first we need to open extensions in the vs code then search for python
there click on python microsoft and we need to install python
after that gets installed now install python debugger
-----------------------------------------------------
how do i create an folder or enviromnet to code
--------------------------------------------------
in order to create a new file click on file on the toolbar then hover and click on
new text file
your new text file is ready
then write your code in that text file and click ctrl+s inorder to save that
file.....
once the file is saved then you can directly run from vs code
ther is a play button in the right corner click that icon inorder to run that file
-------------------------------------------------------------------------------
how do we open an existing file?
-----------------------------------------------------------------------------
hover and click file in the toolbar
then click on open file
then we need to locate our existing file inorder to open that in vs code
once we choose the file click on opoen
our code will be displayed on vs code
------------------------------------------------------------------------------
hover and click on file on toolbar then
click on open folder then we need to select that folder then we need to directly
click open
------------------------------------------------------------------------------