Skip to main content
Open navigation menu
Close suggestions
Search
Search
en
Change Language, English
Upload
Sign in
Sign in
0 ratings
0% found this document useful (0 votes)
5 views
19 pages
Python Assignment
python note book matter
Uploaded by
Pavan Borra
AI-enhanced title
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save python assignment (1) For Later
Share
0%
0% found this document useful, Mark this document as useful
0%
0% found this document not useful, Mark this document as not useful
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
5 views
19 pages
Python Assignment
python note book matter
Uploaded by
Pavan Borra
AI-enhanced title
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Go to previous items
Download
Save
Save python assignment (1) For Later
Share
0%
0% found this document useful, Mark this document as useful
0%
0% found this document not useful, Mark this document as not useful
Print
Embed
Report
Go to next items
Download
Save python assignment (1) For Later
Share
More options
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!
[= 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 “‘[Link] 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
Data Typerffffffffffffffffffffffffffffff
PDF
No ratings yet
Data Typerffffffffffffffffffffffffffffff
15 pages
Unit-2 Python
PDF
No ratings yet
Unit-2 Python
46 pages
Python Unit 1 Notes-1vhhfvnjuhngddtgfdghb
PDF
No ratings yet
Python Unit 1 Notes-1vhhfvnjuhngddtgfdghb
29 pages
B.tech - 4TH Sem - Common - Python Programming - Unit-1 - Notes PDF 2025
PDF
No ratings yet
B.tech - 4TH Sem - Common - Python Programming - Unit-1 - Notes PDF 2025
18 pages
Python Quantum 2023-2024
PDF
No ratings yet
Python Quantum 2023-2024
71 pages
Python Tokens 04 - Class Notes
PDF
No ratings yet
Python Tokens 04 - Class Notes
12 pages
CH 7 Part 1
PDF
No ratings yet
CH 7 Part 1
54 pages
Python Programming
PDF
0% (1)
Python Programming
97 pages
Python Notes-1 Handwritten
PDF
No ratings yet
Python Notes-1 Handwritten
19 pages
Python Unit 1
PDF
No ratings yet
Python Unit 1
17 pages
Python Operators and Control Flow
PDF
No ratings yet
Python Operators and Control Flow
25 pages
Python Bitwise and Logical Operators
PDF
No ratings yet
Python Bitwise and Logical Operators
22 pages
PPS ch1
PDF
No ratings yet
PPS ch1
56 pages
Python Software Internship Report 2024
PDF
No ratings yet
Python Software Internship Report 2024
26 pages
1Ch 5 - Getting Strated With Python
PDF
No ratings yet
1Ch 5 - Getting Strated With Python
21 pages
Python Imp Questions
PDF
No ratings yet
Python Imp Questions
6 pages
Guido van Rossum and Python Overview
PDF
No ratings yet
Guido van Rossum and Python Overview
96 pages
Python Complex Numbers and Operators
PDF
No ratings yet
Python Complex Numbers and Operators
8 pages
CP - Lec.Theory&Codes - PoojaM.HwNotes.@rising Lamp
PDF
No ratings yet
CP - Lec.Theory&Codes - PoojaM.HwNotes.@rising Lamp
77 pages
Python Operators Explained
PDF
No ratings yet
Python Operators Explained
8 pages
Python Theory PDF Doc 08-24-2025 14.39..
PDF
No ratings yet
Python Theory PDF Doc 08-24-2025 14.39..
15 pages
Python Tokens and Operators Overview
PDF
No ratings yet
Python Tokens and Operators Overview
291 pages
3 - Operator String Control Statement
PDF
No ratings yet
3 - Operator String Control Statement
54 pages
Python Internship Report Overview
PDF
No ratings yet
Python Internship Report Overview
43 pages
Report
PDF
No ratings yet
Report
9 pages
Book1 Python
PDF
No ratings yet
Book1 Python
27 pages
23UBC-Python Notes V1.0
PDF
No ratings yet
23UBC-Python Notes V1.0
17 pages
Python Operators and Functions Overview
PDF
No ratings yet
Python Operators and Functions Overview
27 pages
Python Basics and Combn Function
PDF
No ratings yet
Python Basics and Combn Function
13 pages
C Language
PDF
No ratings yet
C Language
10 pages
Python Programming Approaches and Operators
PDF
No ratings yet
Python Programming Approaches and Operators
26 pages
Data Handling
PDF
No ratings yet
Data Handling
12 pages
PYTHON Training Report PDF
PDF
No ratings yet
PYTHON Training Report PDF
40 pages
C Language PDF
PDF
No ratings yet
C Language PDF
115 pages
Python Operators and Expressions Basics
PDF
No ratings yet
Python Operators and Expressions Basics
38 pages
Unit 1
PDF
No ratings yet
Unit 1
18 pages
Python Operators Overview
PDF
No ratings yet
Python Operators Overview
5 pages
Module 2 Cs Sem 1 Notes
PDF
No ratings yet
Module 2 Cs Sem 1 Notes
15 pages
Python Programming Language Overview
PDF
No ratings yet
Python Programming Language Overview
41 pages
Python Basics: Keywords, Variables, Operators
PDF
No ratings yet
Python Basics: Keywords, Variables, Operators
14 pages
Introduction to Python Programming
PDF
No ratings yet
Introduction to Python Programming
27 pages
Software Environment For Python
PDF
No ratings yet
Software Environment For Python
40 pages
Introduction to Python Programming
PDF
No ratings yet
Introduction to Python Programming
18 pages
DocScanner 14-Dec-2024 2-23 PM
PDF
No ratings yet
DocScanner 14-Dec-2024 2-23 PM
24 pages
Python Data Types and Operators Guide
PDF
No ratings yet
Python Data Types and Operators Guide
71 pages
Python Control Flow and Functions Guide
PDF
No ratings yet
Python Control Flow and Functions Guide
68 pages
Types of Python Operators Explained
PDF
No ratings yet
Types of Python Operators Explained
18 pages
Python Keywords and Identifiers Explained
PDF
No ratings yet
Python Keywords and Identifiers Explained
41 pages
Introduction to Python Programming
PDF
No ratings yet
Introduction to Python Programming
9 pages
Python Programming Basics and Loops
PDF
No ratings yet
Python Programming Basics and Loops
11 pages
GFG Last Minute Notes for CS Class 12
PDF
No ratings yet
GFG Last Minute Notes for CS Class 12
41 pages
Operator Concept in Python
PDF
No ratings yet
Operator Concept in Python
7 pages
Introduction to Python Programming Basics
PDF
No ratings yet
Introduction to Python Programming Basics
47 pages
Python Operators and Data Types Guide
PDF
No ratings yet
Python Operators and Data Types Guide
11 pages
Acknowledgment and Python Overview
PDF
No ratings yet
Acknowledgment and Python Overview
42 pages
Python Operators and Branching Explained
PDF
No ratings yet
Python Operators and Branching Explained
37 pages
Python Tokens, Data Types, and Operators
PDF
No ratings yet
Python Tokens, Data Types, and Operators
40 pages
Python Handwritten Notes 1701013067
PDF
No ratings yet
Python Handwritten Notes 1701013067
73 pages
Python Built-in Data Types Overview
PDF
No ratings yet
Python Built-in Data Types Overview
97 pages