37.Programming Assignment 9 ( using tuples and set)

Now you can try following programs using tuple-refer examples before trying

1.Read ‘n’ numbers and find their sum,average,min,max and also print a sorted list.
2.Read two tuples and exchange their values.
3.Find the variance and standard deviation of ‘n’ numbers.
4.Check the number of occurrence of an element in a tuple.
5.Find the positions of occurrences(indices) of an element in a tuple.
6.Read rno,name and mark(out of 50) of n students and store the details in a list as tuple and do the following
 a)Search for  a given student details(input  rno)
 b)Delete a particular student details(input rno)
 c)Display the list in descending order of mark
 d)Display the list of failed students ( mark < 25)

sets- refer example programs
1.Implement the basic set operations union, intersection, difference, symmetric difference 
2.Remove duplicate elements from a list ( keep one copy of the duplicate element)
3.Remove duplicate elements from a list ( do not keep any copy of the duplicate element)
4.Read two sets A and B.Check whether B is a subset of A.

Comments

Popular posts from this blog

Python For Machine Learning - CST 283 - KTU Minor Notes- Dr Binu V P

KTU Python for machine learning Sample Question Paper and Answer Key Dec 2020

46.Classes and Objects in Python- Accessors and mutators