The document outlines a problem set focused on tuple operations in programming. It includes tasks such as swapping numbers, finding maximum and minimum values, extracting usernames and domains from email IDs, checking for a student's presence in a tuple, and creating a list of tuples with numbers and their cubes. Each task aims to enhance understanding and application of tuples in programming.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
5 views1 page
ProblemSetOn Tuple
The document outlines a problem set focused on tuple operations in programming. It includes tasks such as swapping numbers, finding maximum and minimum values, extracting usernames and domains from email IDs, checking for a student's presence in a tuple, and creating a list of tuples with numbers and their cubes. Each task aims to enhance understanding and application of tuples in programming.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1
PROBLEM SET ON TUPLE
1.Write a program to swap two numbers without using
a temporary variable.
2.Write a program to input n numbers from the user. Store
these numbers in a tuple. Print the maximum and minimum number from this tuple.
3.Write a program to read email IDs of n number of students
and store them in a tuple. Create two new tuples, one to store only the usernames from the email IDs and second to store domain names from the email ids. Print all three tuples at the end of the program. [Hint: You may use the function split()]
4.Write a program to input names of n students and store them
in a tuple. Also, input a name from the user and find if this student is present in the tuple or not. We can accomplish these by: (A) Using the built-in function
5. Create a list of tuples from given list having number and its cube in each tuple