Download as pdf or txt
Download as pdf or txt
You are on page 1of 93

Lists operations .

1) remove c)
c)
2) pop
3) clear C)
Removing
'
Y or
spaces ,
anything
from
string .

<
2

÷
List method : -

ins 08th ) : - method .


lists
For loop with multiple .

fusing zip) .

Output

→ james gmail

→ john hotmail

jack yahoo
.


using dictionaries in program .

Example :
-

Ars
:- code

input

input ←

output
output
.


.
Math Library
.

Numeric functions .

nssqhÉn
.

W >

points
→ tfneyyotirefcimal
>
ñ%¥¥Es•

ñ%y¥¥gñ
part
integer
only decimals
.

>gives( without

root of a number
→ math Sort 149)
.

> gives square 7


Tyg =
.

IX. 5
-

Otp : -

7 .

for
.
=
enumerator .

0/ P :

For more built in functions and


methods refer to this :- https://www.w3schools.com/python/python_ref_functions.asp
code with
Python -
mosh .

contents
started
1.
Getting .

what is
1
python
.
: -

Amongst

To use
python
.

companies using python .


Reason -

2 .

python is widely used for .

In this course we are


leasing python 3 .
2. Installing Python on windows .

head over to
Step -2 : open browser
-

step -2 : -

download
latest
version available

step 3 : -

make sure
click
you
this

step 4 : -

verify whether
installed
python >
of not

open

step 5 : -

type python .

check this
-12
press centre "
in

enter to
and
exit .
3. Python Interpreter .

expressions
.

Boolean
}

it doesn't have
} → Here we have incomplete expression
right syntax so python is giving
syntax error
.

> In
programming syntax means
grammar
just like we have in
languages if we don't use correct grammar

of not understand
there are chances some
people may
the sentence .

same
way
we have
syntax in
programming languages
4. Code Editors .

code
→ To write
python we use

→ Editor or IDE →
( Integrated Development Environment)

has
IDE
→ some
fancy
features
like

These IDE
features brings

>
more
productivity .

are the popular


used
f. → These
editors which are
poked 2
popular

→ In this course we are use vs code ( visual studio codes


→ we install
pidgin and extensions that will
us code
convert studio into
powerful IDE .

→ Head over to to download

vs code .
5. Your First python program .

^ nerve
from the tab
click on open

new
create

folder
and
open
-

r
this fill
click
on
this
aide
on python
tab to
create

} eoreate python file


.

Y →
name.

All should have extension


Python files opy
.

ex : app PY
-

]
.

¥ > extension .

name of the file


'
ma
on
save
to

}

to save on windows .

y →

be on
the key
will
symbolESC key before 1
oh key
.

thtsyelow
open
terminal
to to
} studio
" →
vs
on code .

our

we } →
type Python app PY
.
to sun code .

} →
output .
IF Flexion .

filename
.

the terminal window


'
→ To close press Ctrl -1

ref foldernone → file


name
.

••
UP
<qT .

} → file name .

← xp .
6.
Python Extension .

→ we install
plug-in 's and extensions in vs code and
becomes
powerful IDE and we use vs code to
build
python applications .

→ Now lets see how to convert vscode to IDE

using python Extension .

By doing this we
get these
features .

× ,,

→ In latest version of us code we


get extension
by
default to by default vscode is a IDE now .
-
hinting python code .

is linter which files



pylint
shows the
a

error
checks errors in and

used
.

not linter
did
immediately
so .

we
d-
here
pararrthabi
errors
shown

used
now we

^
parenthesis
error is gone
.

so

file
.

see
list our
in
we can error
Here of
✓ ← for mac
.

For windows

of old
in
file .

list
r
↳ No
odd ↳ No error in list .
8. code
Formatting Python .

have bunch document


python community
→ In we a
of
called
python Enhancement proposals or PEPS

click on this

Feat
←¥¥p
(pets

to pep 8 this way of writing


→ according
code is because there is space b/w
variable
ugly no

to understand
assignee and number and it makes little difficult
if there is lot of code written in this way .
→ we can add space b/w %=y manually .

Face tfpace
s

have document which formats the


we also
formattingclean
→ a

code so our code looks .

<

it this
click on

click on this

← search

7 this
click on

2- code gets formatted


automatically .

to view and command palette will be time



Every time going
so have technique which formats the code
consuming we

when the For that have enable this


we save file .
we

feature .

rz .
click ✓type here
n r

3.
click

2. click .
← Type this

7
mark
EYE

we wrote
code
is the

This

saving automatically
After
gets formatted
looks ctean
.

Now code
10 .

python Implementations .

C
language .
} → standard .
II. How code is executed
python .

ti t
Human computer
readable understands .

You might also like