ࡱ> EGD[ 6bjbj $ΐΐ6hh$ z;0;;;;;;;<L?F;;4;DDD*;D;DD]6: Gp(U88 ;J;0z;8T?(?p:?:(D;;Dz;?h q: 9RCS454: PYTHON LANGUAGE PROGRAMMING LAB Write a Python program to: - Demonstrate the working of id and type functions To find all prime numbers within a given range. To print n terms of Fibonacci series using iteration. To demonstrate use of slicing in string 5. To add 'ing' at the end of a given string (length should be at least 3). If the given string already ends with 'ing' then add 'ly' instead. If the string length of the given string is less than 3, leave it unchanged. Sample String : 'abc' Expected Result : 'abcing' Sample String : 'string' Expected Result : 'stringly' To get a string from a given string where all occurrences of its first char have been changed to '$', except the first char itself. 6. To compute the frequency of the words from the input. The output should output after sorting the key alphanumerically. Write a program that accepts a comma separated sequence of words as input and prints the words in a comma-separated sequence after sorting them alphabetically. Write a program that accepts a sequence of whitespace separated words as input and prints the words after removing all duplicate words and sorting them alphanumerically. To demonstrate use of list & related functions To demonstrate use of Dictionary& related functions To demonstrate use of tuple, set& related functions To implement stack using list To implement queue using list To read and write from a file To copy a file To demonstrate working of classes and objects To demonstrate class method & static method To demonstrate constructors To demonstrate inheritance To demonstrate aggregation/composition To create a small GUI application for insert, update and delete in a table using Oracle as backend and front end for creating form The lab experiments for this course have to ensure that the following concepts of PYTHON LANGUAGE are covered during lab classes: Installing Python; basic syntax, interactive shell, editing, saving, and running a script, the concept of data types; variables, assignments; immutable variables; numerical types; arithmetic operators and expressions; reading input from console, writing to console, comments in the program; understanding error messages; Conditions, Boolean logic, logical operators; ranges; Control statements: if-else, loops (for, while); String manipulations: subscript operator, indexing, slicing a string; other functions on strings: string module, strings and number system, format functions: converting strings to numbers and vice versa. Binary, octal, hexadecimal numbers Lists, tuples, sets, and dictionaries: basic list operators, replacing, inserting, removing an element; searching and sorting lists; dictionary literals, adding and removing keys, accessing and replacing values; traversing dictionaries, Array in Python Regular Expressions: re modules, match function, search function, modifiers and patterns Design with functions: hiding redundancy, complexity; arguments and return values; formal vs actual arguments, named arguments. Program structure and design. Recursive functions, scope and global statements, Lambda expressions, Importing Modules, math Module & Random Modules, creating own module. Exception Handling: Exceptions, except clause, try and finally clause user defined exceptions File Handling: manipulating files and directories, os and sys modules; text files: reading/writing text and numbers from/to a file; Simple Graphics: turtle module; simple 2d drawing - colors, shapes; digital images, image file formats. Graphical user interfaces: event-driven programming paradigm; tkinter module, creating simple GUI; buttons, labels, entry fields, dialogs; widget attributes - sizes, fonts, colors layouts, nested frames. Database: cx_ Oracle module, Connections, Executing Queries, calling procedure and functions, Using GUI to access Database. Object Oriented Programming: Concept of OOP: Abstraction, Encapsulation, Inheritance, and Polymorphism in Python, classes, objects, attributes and methods; defining classes; design with classes, constructors and destructors, inheritance, polymorphism, operator overloading (_eq_, _str_, etc); abstract classes; aggregation and composition. Reference books: John M. Sewart, Python for Scientist, Cambridge Universities Press. Reema Thareja, Python Programming Oxford Higher Education. Robert Sedgewick, Kevin Wayne, Robert Dondero, Introduction to Programming in Python Pearson Mrak Litz, Learning Python,O Reilly Mark Pilgrim, Dive into Python, Apress James L. Young, Python made Simple and Practical, Kindle Edition (paperback) Y. Daniel Liang Introduction to Programming using Python Pearson ()FS`q56$h:hSvCJOJPJQJ^JaJ$h:h V*CJOJPJQJ^JaJ'h:h V*5CJOJPJQJ^JaJ ()F{  0 M K & F gd:$ & F a$gd:$ & F a$gd: & F gd: & F gd: & F gd:gd:$a$gd  , J h &M#STl(Y$a$gd:gd: gd: & F gd: _`qS{6 & F gd:gd:$a$gd: >&P 1h:pSv. A!"#$%0 B#>&P 1h:pSv. A!"#$%0 B#n 666666666vvvvvvvvv666666>6666666666666666666666666666666666666666666666666hH6666666666666666666666666666666666666666666666666666666666666666662 0@P`p2( 0@P`p 0@P`p 0@P`p 0@P`p 0@P`p 0@P`p8XV~$OJPJQJ^J_H9mH nH sH tH 8`8 Normal_H9mH sH tH DA D Default Paragraph Font6i6 0 Table Normal (k ( 0No List PK![Content_Types].xmlj0Eжr(΢Iw},-j4 wP-t#bΙ{UTU^hd}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ѐ'theme/theme/_rels/themeManager.xml.relsM 0wooӺ&݈Э5 6?$Q ,.aic21h:qm@RN;d`o7gK(M&$R(.1r'JЊT8V"AȻHu}|$b{P8g/]QAsم(#L[PK-![Content_Types].xmlPK-!֧6 +_rels/.relsPK-!kytheme/theme/themeManager.xmlPK-!Ptheme/theme/theme1.xmlPK-! ѐ' theme/theme/_rels/themeManager.xml.relsPK] 6$@$6 6l,R$ 5VN}6 k D@0(  6 3  6}CK    $'y!SWX\ir8558Cfv8Vr48z"ħA hk fjN x PQ C @>?Zٻb$alC\b;4`FQ (12ԝt.=fd.. ^`o(hH. ^`o(hH. ^`o(hH. ^`o(hH. ^`o(hH.... ^`o(hH... ^`o(hH.. ^`o(hH"  ^`o(hH.. .. ^`o(hH. ^`o(hH. ^`o(hH. ^`o(hH. ^`o(hH. ^`hH. pL^p`LhH. @ ^@ `hH. ^`hH. L^`LhH. ^`hH. ^`hH. PL^P`LhH. ^`o(hH. ^`hH. pL^p`LhH. @ ^@ `hH. ^`hH. L^`LhH. ^`hH. ^`hH. PL^P`LhH. 12.HhNn-!$LL4}R@ȫ~Yؘ` ~ʑ(ՊNn        "`         V*: Sv68@6@@UnknownG.Cx Times New Roman5Symbol3. *Cx Arial7.@CalibriA$BCambria Math AhUX'`XG ! !!d0-- 2QHX $PSv2!xxrgpvonline.comp                    Oh+'0X    ,8@HPNormalrgpvonline.com5Microsoft Office Word@[@@g՜.+,0 hp  Hewlett-Packard! -  Title  !"#$%&'()*+,-./012356789:;=>?@ABCFRoot Entry FVpH1Table@WordDocument$SummaryInformation(4DocumentSummaryInformation8<CompObjy  F'Microsoft Office Word 97-2003 Document MSWordDocWord.Document.89q