0% found this document useful (0 votes)
20 views3 pages

Python Prints 24

Uploaded by

manushukla9956
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
0% found this document useful (0 votes)
20 views3 pages

Python Prints 24

Uploaded by

manushukla9956
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
Hello World This is Tanmay welcome to Python journey num= 23 sq root of num= 25 sq root of 25 is 23 is --conversion-- km--miles km= 10 miles= 6.21 4.79] 5.0 a= 23 b= 30 738 the sum of 23 and 30 is 53 Side of triangle ar ; area of triangle: 10.392304845413264 sq. unit before swapping --conversion- -conversion-- decimal--hexadecimal —— decimal--binary decimal--octal decimal: 16283 after swapping decimal: 18 decimal: 198 aie ace te eteey: tor Goes os, 40 bexacaiua: Geta : ~conversion-~ Enter year: 2000 ~conversion-- ASCII. GENERATOR-— 2000 is leap year celsius--fahrenheit Eater character: a a0-0 celsius fahrenheit: 95.9 ‘The ASCII value of a is 97 Enter character: A ‘The ASCII value of A is 65 Enter character: $ ‘The ASCII value of $ is 36 -merge dictonary-- {1: "ONE", 2: {4: "FOUR", 5: merged : {1: [tony ('maxie', dict[ 1]: ONE Type conversion-- dict[ 2]: Two type of num : dict[ 3]: THREE now type of num : lis[Link]-- ist concatenate. ‘steve "dustin", : ['tony', 'steve', 'bruce', 'el', 'maxie', 'dustin', 'joyce'] 30 is even iterate over dictonary-- list slicing- "TWO', 3: 'THREE'} ‘FIVE! "SIX'} ‘ONE', 2: 'TWO', 3: 'THREE', 4: "bruce", 'el'] "joyce'] --conversion-- {1: popped out elem: ONE [23, 30] new dictonary: "ONE', 2: "TWO", 9: ' Enter year: 2022 2022 is not a leap year Enter year: 2023 2023 is not a leap year Enter year: 2024 2024 is leap year "FOUR", ‘FIVE’, 6 "SIX'} 23 is odd --count-- string: australia a occurs: 3 times NINE', 4: 'FOUR', 3: 'THREE'] His[1:3]-- ['T', 30] | (2: ‘twot, 9: "NINE", 4: "FOUR', 3: 'THREE') --list element are-- RES 23b: 30: 16 23 is prime a 30 is greatest Mist = = | the list is empty --remove redundancy-- --check palindrome-- : ae 1, 3, 5, 1, 51, 1, 3) naman is palindrome 153 is armstrong Ty. S, S,. S81 tanmay is not palindrome 23 is not armstrong . a-check if key is already present--|_, w-capital-- GaN, tors '2, sere ay size of tuple-- tony ao (1, 4, 74, 8, ‘henry') = ae Size: $ False --deleting a file-- [Link] deleted Succesfully!! --Myclass is created.. attribute n methods are assingned to it.. original list: [1, 35, 6] --pascal triangle--| 7 STUate™ tuple-->list 1 now list is :[1, 35, 6, 'ts', ‘ak', 'ss'] 11 = str? List-->tuple 121 keke original tuple: ('ts', ‘ak', 'ss') 1324 el now tuple is: ('ts*, ‘ak', *ss’, 1, 35, 6), 14641 eR --details of Myclass-- --deleting obj-- --copying a [Link] to [Link]-- clsar: ie _ joss teit_anclas> centen Sn [Link] otal strength: ae io! baie aa Trcic st rece cll st): eas oe ae File "e\Gsers91817\Desttop nay tast hehe! S/w Eng. ue ieerien 6 ome Architecture print class) iatiatt 7 en Nanefrror: nane 'WyClass' is not defined, this is me Accounting H oops _concept-- =-get_permutations—— Inheritence- possible arrangment of ‘abc’ are : parent class : Parent 2° John Doe = Speed up ... child class: Child bea ¥ . cha Not having this feature |Mike Olsen aa --creating a file-- --Polymorphism-- A write something in file:Hello this is Tanmay Drive! deo txt is ope Successfully created.. Sail Now closed!! [Link] is created Fly! | --Encapsulation-- ~-evaiy of file Selling Price: 900 Selling Price: 900 Selling Price: 1000 test renaned to nevfest successfully, [-writing in a file-- lnter msg: hello my name is Tanmay.. succesfully written !! --reading a [Link] con’ hello my name is Tanmay. file-- tains: [--print details-- --pyramid~ Imy name is Ash * dam 20 year old es Iny name is Ray fete iam Qyearold |oeceaaccse list: (3, 5, 23, 30) <-checking 23 present in tuple-- tuple: ['ts', ‘ak', 'ss'l 3 is enere in a aise

You might also like