Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
26 views
Python Assignment
python note book matter
Uploaded by
Pavan Borra
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save python assignment (1) For Later
Download
Save
Save python assignment (1) For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
26 views
Python Assignment
python note book matter
Uploaded by
Pavan Borra
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save python assignment (1) For Later
Carousel Previous
Carousel Next
Save
Save python assignment (1) For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 19
Search
Fullscreen
by] wisitte alsout operators 8° python % NF Operators aye! Used to’ parkerin operations on orem ds such as vworables and values: “ie | fallouting Ore PRerent types. of Operators ‘in yon, ; fithnnatic. Operator . : © Relational oferater (1) comparison operator 3 Assiqnrrent opercitor a hopjicol oferator S: Bitise Oferattor + 5) Membership ofercitor , > oh. Ddertt Operator . i ; SArtthrnatic, Operator These ofercrtors are Used to Pertorrn ovithmnatic operations such 0S’ Addition, | Suipbrackion, Muttipliaadron, dvision etc with numeric Values 1 yt gh yee het GQ=lo, bed Operator Meaning eG" as | Slesalt | | + Addition ote ty | | - subtraction ©, edb os! | - | KO Multiplication |. oto ee / Division alb , Oe *, Modulus ofector acho 0 to yernoindey eK | atponent | CukKb | 1b0 LLU. ongiigontings) attb | 5T+ cperstor ia applicalele for sig ‘yee Fe ie concatenation >yOTOY - { Print (! eq + ‘coltepe!) | | Olp- 9 ore ‘ol lec we | yt? one eee athe. “operand is not Q. «sting Ype | then COS, lag Exror Péint Cal - + (0) Tyfeenor:: can only Concotenate str(not ‘int!)to | Set can also be Opplicatsle for Stings | Repetition operator. IP 0. ‘oferatoy 1@ a ony % Ee strin Np pe, OMe ar amen Shoct| oped iy and ober ty Shou \d be ‘int | Eg Pr pfnk C' Hello! *3) | tello Hello Hello * sprint (2% Hello’) tello Hello ttello Pech aot) “TYfeerror- cannat _ multiply +the Segjuenes bg no ~int ‘of peste 2 Relational opercitors o Connpavison pest tars 2 */ Compogison, - CResators ore. “Used “fs Gmpore {00 values: 2 Opercitéxs yesutts WA either True y)False het O=l04 b=80 operator eas Exosnples Result z hess thon aso . Tue | 2 ve Creates, then - azb False | <= hessthan@nejud. C£6 9 True | Ze Grrectis tone) azh | "Calse | E9juUal +0 \ | l= Not €qyalto Al=b: “Tee == equalte = Ges False | Sy/Even we Can apply Relational operaters Sor ran fe: TR we col Relational operdtos — Por “string type, the! com posisan usill boppen based at. Unicode [AIT Value oF sting | ay pint Cale’) | Slpr False te | “k Note ae oo AY orl) Punction con be usecl-to find unicod Value, ob a character Sy Pinto cx") ! {co \ ' 1 Pink CoC) en | _(Dehore.a Punefion con ibe, used to-find chonet“O Pre Aven Urficode BQ. Pint Cohow (Q4)) a - Print Cchor(Q¢) ’ b= False i, Bint Geb) —> False Print_@ac=b)-> false. _ Pilot Coxb) > true Print (0>2b)—> True: iy? OMnot- apply stelotienal operat for incompatcalsle - (cow occur: types, otnennutise “yfe Sxror EQ" pant Co!
a= Tue | |Gnnect A value chtavned. b Expression Fokse ORe. True etl tS mercies or! operator results True [Prevator ee | Expression | : FeBo | y-otb its T+ 10 ri=mH10 Te) Melo | mem-lO es M*=lo | m=em*io. | l= , Mlslo memo | = Mefelo. Mem?/. 10 eal NYE = M=MAK O° 1 Il - | (1) m*> [= moll =l0 r= mllio ENaluartin hol iQ come hirer OPercitor {50 tS a Aas \ iP atleast one of h. loFical Operators = Lomical OPercters are uselte More relational ofertors to form a | Complex expression Callecl hogical Expression iN9 Q hokcal 4S aleoays hogicat Gither “TueGr) and! oVerotor results True if both ofeiands | |$$$ Operator Meoring | 4 eee ; one hogical end | GéalandG73) False oT ‘ hoqueal of | (64a) or(S23)| True tee |_heaical vot | Nob C549)! True | © Tents operatons + 7 7 adentty operators are used to COrnPave the! | memo hocation OF 000 Objects. 7 There ate! tu06 identity ofeators “in Python | =KiS : ae sk isnot ) Im 1 T@ My returns Te iP. andl only if _ both seferences are Pointing to Some Odyect] | Address and. False otherwise =r TR oy IS. NOE Sy ‘steluINS “FUE 3 andl oniy ie both xeferences “ore. pot Pointing 4p the Same address arol False others . | && [aslo ihe 4 = b=lo Print (ais b) “True. ‘Print (a ‘is not b) falee 7 Q-O= bo _a b-a Print (a is b) False Print Corts notb) [rue 243: % L193) Ye, Qs Print (x Ps y a False - ) AOEEISHIP operator. The membership operates aa +B check Cohether the Given Object M A seyUence such as ~stirg, list,) tuples and dictionaries U ‘ sylheve ove 00 membership oferators | sein ‘ ; } 4 sg NOE TN : i int This opedior is used te Pind on eleme =n ‘in the specified seoyuence . “Te rettians rue 72 elernent 1g found Nthe specified Sequence else it yetums | pet False a fia,3) | a * b=3 5) | ant Clo in | Pte |—_—_------——_. Q S='hello! print Ch ins) Wwue | DOIN THis operator works In mEve”"Se mon nen for Sn’ operater 'yTt returns true % the element is not ‘Round “in the Specifiedt sequence anc 7? elem amt 38 found, -then it returns Palse- E4> gchello! Print Cat! not ing) “True 3. print CAS hot ins) | Fo + Bitwise oferators:- Bitwise OPetatots Are Ug ito fexfown erations at binat, digit: Jerel. |Wese Spin ase net comminty Used ond jase Used only in Sfedal anoeVi ie: eee 2) See Spl The below are +he jy isaac tWISe oO lavoila ble an Python. rears {| [| [operetor a a 1 | | “Biwise “qin D | \ Rrtwise OR i A Bitwise fuclusive oR! SD Bitwise TNnvernston AoPkchiftoperater fc | or i peste operator Brkwise Operator can be used Ror tnt Pe And koolean type Otteruise Unsupported OPerand PRS Err Type error Occurs: | Bitwige
and segutts A lisa £9 Pint C415) \ a Print Ctrue | False) | “True 1 both | 3 Biislise we Xeg t- Tis oPerator yesults " i "| bits an are cifPerent and results iat a | ie Are Same. | &- ae C4 AS) brick CTrue A True) False pring (True A False) True ke. Bitwige complemen’: operator :- This Operator TQ Used ts pie “the bits Bam oto 4 ard Ato 'o eg ciate Cau) seit opester:- “These oPerodors Ore used anette biz of the Nabe te she i‘ the (eft) “ante by the no-of bits Specified yesuttS 5 4E | T ae ates one bit[Sy There Ore 00 tues of hiv openater I i ereftchite opera’ eae i 6. Right Shift operator (37) . 5: hePechift Speier c- Ths operator TQ Used te Shite the. bits hte number to the kee by | the nook bite Specified) | S9 jocca shite g, bits to the heft | paint Cio <
rQ shifts a bits to the “ight Print Cloz>Q) 7 The Following table lists all the ofeates Peony highest Precedence to the howest-eee cree eee ere ay Oferalor [ en ae | +t a m+— ofc wary puson # Ul util divide, Module any Ploor “clivésion | aa ¢idakion ond Subacton | | alee ight afd Actiship. Diteoigg | OPeratars \ Fe Gitutse JNO ee Bwise relugve OR and eee Comparison operators as Sal Operators =belelle = | aest Amenk OF code (Sat poke q fe 45. ‘Snot Teeny Reales Noe ot Gnd | logical Operatorsafore - iin “gfe Baten Pancton i Wowin A) pincons 4 are eae type buile-in dy care aly) atv) cit) reprC) CY typeC) Gempc)> ethts function can be used to compere Kod ‘integers and relum -1,0,1 accorcli Yocmp Sy This Vinton vas built-in Bunction -Sen. Python Por Comrfarieg the values of 400 Objects, =yit oesrot, orl i Pythons and sped Coit the == and" iS operdtors ai ~ emP (ail); a,b afe +00 oes yeturng -| iP adh © if a=b . \iRarzb Sty 0 -_ Sane Comp Ca, b)) oles -\ re rrrcneedpant ccmp (Q jb) Olp- | (hanes Sn Panction can be al jer type values to sting : 7 Symtoxs strColgect) » Here the object an be any data Pe ~ P72 Sr Cio) Op Nig! PD Str (10:5) | ipso PD Str Lto+ qj) LP Notaqy! 72st We) Ole: Tue! Psy CoBin)-> First 4 \ Value OSI] be conestel into decimal Sim. Then run -en 16 represented “in string Porre) ole V5 | } ‘al) Yepr) }i- The yeprc) Punction can be used ts Yetuurq Sing Corton imable rvePresentation’ of. cn Tagject 0 i p ; “ySyptou'- replok) OW}\-F The object cohose Printable re -ntakion 1 to be returned Yeturnti pes Strin ey Pring Crepy(to) ) olp 10" (9) Pr print CreprCios)) Olp'- Nos! | @) Pant (repr CTrue)) Ole ' Fue! | 8d § cae CrePr (Ja) | ole | Giga Me tyfed 49 Used to get the ‘type an object: when a gine wment IS Possedtto 44 Fe) ie teturns the “fd oF “the olyect- Sy Tes Valve 1 the Same a5, the object sree Clogs. ++ instance yarialele.y MOL type Cx) Ne Print C clo) ae hs () Pant CtyPeCio's)) 5) clogs Ploat > a i is ee —Oo , explain wel Susting fin Python? W] wlebsurfing:- wel surfing falls under client-server archite -cture umbtolla that ia as follouws:- Sy client- Sewer architecture tg a. distributed) computing tnode\ in a client machine makes oa. quest “fo & Server machine, ard’ server | machine Provides “he client with the tequeste -c\ S4xvice (@r) YeSource. , > Th Ais Grebftecture, “the cliett rnachine Usual “‘nttiates he Cornmurfication by ending weQyuest to the Server machine then Process the. Yeoyuest And Sends the sesponse back tothe! Client machine. The client and ervey machines, Con be Connected ovr a local d\rea Netinork | /|CAAN) | Wide Grea Netoork Coo An) | Grea leducsta wee Webs | =yThe webclient Ta a browser @) apptastor are responsible for “‘intero.cting the request and displaying the. response. tb +he user, Cotiile the Sever “tg* responsible for Processing the | request and providing the Tesponse 1 ey Serb) 4 iio iieneengremnttlPo for client Neoyuest process “then ard NN vetUr phe uestect dota: > Te eben and webserverS re 2b commurkcation using standard Proto@! Coll) OS Hypertext -branefer A eccnl cute 7 We susifrny worth hon Picall Awol ve wail hon “ Gbrovies . Und aired to peste ike Sendin TTP requests, Parsing ae and ‘interacting the eb poges- oles Ore Some” Eromnples What We cn | Q02.- DSEESIY ATIP teqquest:- PF We CN Use the Yecwuest module to Send TTP requests and veceive vespong From Unelp serves, =7 for 29, we can gd a GET veryvest 5 ~ Welnsite ard retfee 14S HIML Content “7 Trnfore requests , Orle!httPss |] Couto: eAOrTPle-Com Fesponse= request get Curl) Print C Yegfonse. Content) BQ) Parsing $M Li- : Whe Ann = =ywe d% Use Parse library lke SBeoudita Seo.P! to forse eel cee and extiadt[Speci iafaenation Plone them. eet ler eq, WE CAN Extract all -the tinka -Prom a tneb Poerge from ‘bs4 WenPport Beoutefulseep import yequests Or} at https: /1 Wtol0- erample. dom | TesPonse = Tequest getCur}) Soup= Beautiful Soup CreStonse content ; herd. Vioks= Soup. Pind Avi cra'y P™e Por link in inks? Print Clink: geec href") )
You might also like
Unit-2 Python
PDF
No ratings yet
Unit-2 Python
46 pages
Unit 2 Notes Python Operators and Control Flow Statements Part 1
PDF
No ratings yet
Unit 2 Notes Python Operators and Control Flow Statements Part 1
25 pages
Chapter 2 Python
PDF
No ratings yet
Chapter 2 Python
23 pages
Python Quantum 2023-2024
PDF
No ratings yet
Python Quantum 2023-2024
71 pages
Python Programming
PDF
No ratings yet
Python Programming
97 pages
Operators
PDF
No ratings yet
Operators
11 pages
python unit 1
PDF
No ratings yet
python unit 1
17 pages
unit3-GE3151 NOTES
PDF
No ratings yet
unit3-GE3151 NOTES
15 pages
UPDATED Data Science With Python Lab
PDF
No ratings yet
UPDATED Data Science With Python Lab
35 pages
Unit2 2
PDF
No ratings yet
Unit2 2
33 pages
CPT211 - Lecture Note 3
PDF
No ratings yet
CPT211 - Lecture Note 3
6 pages
6. Operators
PDF
No ratings yet
6. Operators
13 pages
Operators 1
PDF
No ratings yet
Operators 1
14 pages
Python Basics
PDF
No ratings yet
Python Basics
35 pages
Index Important
PDF
No ratings yet
Index Important
18 pages
Python Operators & Precedence
PDF
No ratings yet
Python Operators & Precedence
31 pages
Python Operators PDF
PDF
No ratings yet
Python Operators PDF
15 pages
Python Operators (Slideshare)
PDF
No ratings yet
Python Operators (Slideshare)
43 pages
6 Operators
PDF
No ratings yet
6 Operators
21 pages
Operators in Python
PDF
No ratings yet
Operators in Python
17 pages
Python Handwritten Notes 1701013067
PDF
No ratings yet
Python Handwritten Notes 1701013067
73 pages
Python ? Handwritten Notes
PDF
No ratings yet
Python ? Handwritten Notes
73 pages
Software Environment for Python
PDF
No ratings yet
Software Environment for Python
40 pages
Python 1st Unit
PDF
No ratings yet
Python 1st Unit
25 pages
Data Structures
PDF
No ratings yet
Data Structures
18 pages
My Note 1 Cat 12
PDF
No ratings yet
My Note 1 Cat 12
10 pages
Unit 3,4,&5 Material
PDF
No ratings yet
Unit 3,4,&5 Material
68 pages
Python Handwritten Notes?
PDF
100% (1)
Python Handwritten Notes?
31 pages
Revision Basics - Python - Notes - 1
PDF
No ratings yet
Revision Basics - Python - Notes - 1
18 pages
Unit 2
PDF
No ratings yet
Unit 2
20 pages
Ravi
PDF
No ratings yet
Ravi
9 pages
Python 2022
PDF
No ratings yet
Python 2022
12 pages
OPERATORS Dsoft
PDF
No ratings yet
OPERATORS Dsoft
14 pages
Python - 10 Marks Sol. of Previous PUT_Bharat_Agg
PDF
No ratings yet
Python - 10 Marks Sol. of Previous PUT_Bharat_Agg
43 pages
Cgi_python Internship Report
PDF
No ratings yet
Cgi_python Internship Report
43 pages
Python
PDF
No ratings yet
Python
13 pages
PWP Important Semester Questions
PDF
No ratings yet
PWP Important Semester Questions
12 pages
ML 1st mod
PDF
No ratings yet
ML 1st mod
156 pages
Final 1
PDF
No ratings yet
Final 1
36 pages
7.data Handling Notes
PDF
No ratings yet
7.data Handling Notes
21 pages
5 Python Operators
PDF
No ratings yet
5 Python Operators
21 pages
PYthon Class 8 Telugu
PDF
No ratings yet
PYthon Class 8 Telugu
8 pages
2.python Operators
PDF
No ratings yet
2.python Operators
30 pages
Python File Mca
PDF
No ratings yet
Python File Mca
35 pages
Numerical Methods Using Python: (MCSC-202)
PDF
No ratings yet
Numerical Methods Using Python: (MCSC-202)
29 pages
data-expressions-statements
PDF
No ratings yet
data-expressions-statements
16 pages
Python presentation 2
PDF
No ratings yet
Python presentation 2
27 pages
Module 2
PDF
No ratings yet
Module 2
38 pages
488064230-PYTHON-Training-report-pdf (1)
PDF
No ratings yet
488064230-PYTHON-Training-report-pdf (1)
40 pages
phython codes
PDF
No ratings yet
phython codes
17 pages
Manual of Python
PDF
No ratings yet
Manual of Python
43 pages
Python Revision Tour - I
PDF
No ratings yet
Python Revision Tour - I
23 pages
Python operators
PDF
No ratings yet
Python operators
34 pages
Operators Complete
PDF
No ratings yet
Operators Complete
26 pages
Operators
PDF
No ratings yet
Operators
19 pages
Python
PDF
No ratings yet
Python
15 pages
Lab Manual Python
PDF
No ratings yet
Lab Manual Python
114 pages
Srihari
PDF
No ratings yet
Srihari
1 page
Coding and Decoding
PDF
No ratings yet
Coding and Decoding
7 pages
P UG Third Sem (Reg) Time-Table (Jan'24)
PDF
No ratings yet
P UG Third Sem (Reg) Time-Table (Jan'24)
4 pages
Ey
PDF
No ratings yet
Ey
6 pages
Related titles
Click to expand Related Titles
Carousel Previous
Carousel Next
Unit-2 Python
PDF
Unit-2 Python
Unit 2 Notes Python Operators and Control Flow Statements Part 1
PDF
Unit 2 Notes Python Operators and Control Flow Statements Part 1
Chapter 2 Python
PDF
Chapter 2 Python
Python Quantum 2023-2024
PDF
Python Quantum 2023-2024
Python Programming
PDF
Python Programming
Operators
PDF
Operators
python unit 1
PDF
python unit 1
unit3-GE3151 NOTES
PDF
unit3-GE3151 NOTES
UPDATED Data Science With Python Lab
PDF
UPDATED Data Science With Python Lab
Unit2 2
PDF
Unit2 2
CPT211 - Lecture Note 3
PDF
CPT211 - Lecture Note 3
6. Operators
PDF
6. Operators
Operators 1
PDF
Operators 1
Python Basics
PDF
Python Basics
Index Important
PDF
Index Important
Python Operators & Precedence
PDF
Python Operators & Precedence
Python Operators PDF
PDF
Python Operators PDF
Python Operators (Slideshare)
PDF
Python Operators (Slideshare)
6 Operators
PDF
6 Operators
Operators in Python
PDF
Operators in Python
Python Handwritten Notes 1701013067
PDF
Python Handwritten Notes 1701013067
Python ? Handwritten Notes
PDF
Python ? Handwritten Notes
Software Environment for Python
PDF
Software Environment for Python
Python 1st Unit
PDF
Python 1st Unit
Data Structures
PDF
Data Structures
My Note 1 Cat 12
PDF
My Note 1 Cat 12
Unit 3,4,&5 Material
PDF
Unit 3,4,&5 Material
Python Handwritten Notes?
PDF
Python Handwritten Notes?
Revision Basics - Python - Notes - 1
PDF
Revision Basics - Python - Notes - 1
Unit 2
PDF
Unit 2
Ravi
PDF
Ravi
Python 2022
PDF
Python 2022
OPERATORS Dsoft
PDF
OPERATORS Dsoft
Python - 10 Marks Sol. of Previous PUT_Bharat_Agg
PDF
Python - 10 Marks Sol. of Previous PUT_Bharat_Agg
Cgi_python Internship Report
PDF
Cgi_python Internship Report
Python
PDF
Python
PWP Important Semester Questions
PDF
PWP Important Semester Questions
ML 1st mod
PDF
ML 1st mod
Final 1
PDF
Final 1
7.data Handling Notes
PDF
7.data Handling Notes
5 Python Operators
PDF
5 Python Operators
PYthon Class 8 Telugu
PDF
PYthon Class 8 Telugu
2.python Operators
PDF
2.python Operators
Python File Mca
PDF
Python File Mca
Numerical Methods Using Python: (MCSC-202)
PDF
Numerical Methods Using Python: (MCSC-202)
data-expressions-statements
PDF
data-expressions-statements
Python presentation 2
PDF
Python presentation 2
Module 2
PDF
Module 2
488064230-PYTHON-Training-report-pdf (1)
PDF
488064230-PYTHON-Training-report-pdf (1)
phython codes
PDF
phython codes
Manual of Python
PDF
Manual of Python
Python Revision Tour - I
PDF
Python Revision Tour - I
Python operators
PDF
Python operators
Operators Complete
PDF
Operators Complete
Operators
PDF
Operators
Python
PDF
Python
Lab Manual Python
PDF
Lab Manual Python
Srihari
PDF
Srihari
Coding and Decoding
PDF
Coding and Decoding
P UG Third Sem (Reg) Time-Table (Jan'24)
PDF
P UG Third Sem (Reg) Time-Table (Jan'24)
Ey
PDF
Ey