0% found this document useful (0 votes)
2 views2 pages

Python Programming KNC 302

The document outlines various Python programming concepts including the programming cycle, list slicing, module importing, and the differences between arrays and lists. It also covers specific operations like floor division, the difference between append and extend, and the definition of dictionaries and object-oriented programming in Python. Additionally, it includes coding examples and tasks related to string functions, loops, file handling, sorting algorithms, and exception handling.

Uploaded by

ravanraj6549
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)
2 views2 pages

Python Programming KNC 302

The document outlines various Python programming concepts including the programming cycle, list slicing, module importing, and the differences between arrays and lists. It also covers specific operations like floor division, the difference between append and extend, and the definition of dictionaries and object-oriented programming in Python. Additionally, it includes coding examples and tasks related to string functions, loops, file handling, sorting algorithms, and exception handling.

Uploaded by

ravanraj6549
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
You are on page 1/ 2
Explain the Programming Cycle for Python in detail. Describe the concept of List Slicing with a suitable example. ‘Show the way to import the module in python. Differentiate between Python Arrays and lists? (©) Define floor division with an example. 5 ( Explain the difference between ‘append, and ‘extend’ in Python? (@ Whatis a dictionary in Python? © {h) _ Whatis object-oriented pro; )P) in Python? Give an example. Y @ What will be the output of the lowing python code ae en ay He each count += 1 return count print(count1(‘I love India")) n @ What wil be the ouput of the following onde? list =['M’,‘0’, 'n', , 'y'] xo é print("@" join(list1)) 5 ‘SE v Attempt any three of the following?) Sx3=15 (2) Demonstrate five differet’ built in functions used in the string. Write a ‘ program to check wal a string is a palindrome or not. (») Explain the folk loops with a flow diagram, syntax, and suitable (©) (@) © examples. 1 For 1) while Explain the continue, break, and pass statements with a suitable example. Develop a program to calculate the reverse of any entered number, Explain the list Comprehension with any suitable example. D Encapsulation _ II) Inheritance 5. a any one part of the following: Sxl=5 — (a) Demonstrate the file handling procedure in detail. Write a python code to create a file with ‘P.txt’ name and wri name and father’s name in this x file and then read this file to print it (6) Demonstrate the ‘Sieve of Teatdfches’ theorem and write the patton function to print prime nt een | to 100. i jon to print prime ee 6 6. Attempt any one part of the apie a “y (a) Develop and te the python code of soins to sort 41,65,43,91,12514,62 elements. Also, explain its cot ity: () _ Explain Binary search with its python code and comaia ‘fs Attempt any one part of the following: oy 5x1=5 (a) Explain the importance of Exceptiod “handling in any object-oriented programming language. Explain ty exceptions and finally block with any suitable example. be (b) Summarize the ‘Tower of Hast uzzle and write its recursive function to implement it. of v gS ND

You might also like