0% found this document useful (0 votes)
11 views51 pages

App (Exercise and Practical:)

The document covers various concepts related to Python data structures, including strings, lists, sets, tuples, and dictionaries, along with their operations and built-in functions. It also discusses modules and file handling in Python, providing explanations, examples, and multiple-choice questions for assessment. Key differences between data structures, as well as methods for creating and manipulating them, are highlighted throughout the text.

Uploaded by

mitanshparmar201
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)
11 views51 pages

App (Exercise and Practical:)

The document covers various concepts related to Python data structures, including strings, lists, sets, tuples, and dictionaries, along with their operations and built-in functions. It also discusses modules and file handling in Python, providing explanations, examples, and multiple-choice questions for assessment. Key differences between data structures, as well as methods for creating and manipulating them, are highlighted throughout the text.

Uploaded by

mitanshparmar201
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/ 51
1.48 ne ty What do you mean by Strings are jmrmutable? Explain String Operations. Explain String built-in fa Explain List Operations. Explain List built-in finetions and methods Write the properties of set in python. Define Set and how ig it created in python? sin set tions and method’: Explain accessing ite List functions to delete items in sets. Explain Frozen sets. Explain Set operations in python. 1 why pop is different from remove, Write how to add, remove an element from & Sel Explait Write differences between list and set Define Tuple and how is it created in Python? What do you mean by Tuples are immutable? Expain Tuple Operations. Explain Tuple Built-in functions and methods. Differentiate between tuple and list. Explain Tuple unpacking. Explain Nested Tuple. Write down the properties of dictionary What is Dictionary? Explain with example. ways to access values of a dictionary: Describe the various Explain different operations performed on the, dictionary. Explain properties of dictionary keys. What are the different ways of deleting an element from a Explain Dictionary Built-in functions and methods. dictionary. Do the following (MCQs) 1 Tuples are (A) Mutable (B)_ Immutable (C) Mutable to some extent (D) None of the above Tuples can contain elements of any data type.(T/F) (A) Tue (B) False In tuples values are enclosed in (A) Square brackets (B) Curly brackets (C)_ Parenthesis (D) None of the above Write the output of the following. ‘A = tuple(Tuple) print(A) . ed aii rn (D) None of the * > gasies of Python Data Structure - Dictionary, 5 6 1 9. 10. ML. 12 13. 14. 15. 16. 17. Tuplo and Set Ten( ) function returns the (A) Tre (B) False Write the output of the following: A = list(tuple(Python)) print(A) (A) @yth on) (By [p, Yt ho, a} (C) Error Write the output of the following, =(32,29,56,30,11) print(a[0}+a,index(30)) mber of elements in tuple.(T/F) (A) 35 (B) 32 (C) 36 Which of the following is not a function of tuple? (A) update( ) (B) min ) (C)_ max( ) Write the output of the following: a=(11,9,38,16) print(s) (A) 74 (B) 54 © 0 Write the output of the following: a=(9, 2, 2, 3, 11, 6, 1) print(min(a) + max(a) + a.count(3)) @ 2B @) 2 © 15 Which of the following is/are features of tuple? (A) Tuple is immutable () (C)_ Intuple, elements are enclosed in Parenthesis. (D) All of the above Which of the following is not a tuple? A) P=123,45 ®) Q=@ be) (©) R=(,2,3,4) Which of the following statement will create an empty tuple? A A=(C) (B)_B = tuple( ) (C) Both a and b Which of the following is a tuple with single element? (A) A=() (B) A=1, (C) Both a and b Write the output of the followin; a=(Q) type(a) (A) (B) (©) What is the length of the given tuple? t1=(1,2,(8,9,10)) @l (B) 2 () 3 Write the output of the following: al = (1,2,3,4,5) a2 = al print(a2) (A) Error (B) (123,45) (C) 123,45 () (D) (D) @) @) ‘Tuple is a sequence data @) @) @) (D) (D) (0) 149 None of the Above 62 count( ) Error Error type. None of the above None of the above None of the above

You might also like