Assignment 4 -- Lists, Searching, Sorting

Lists

  • Develop a Python program for adding and multiplying two large integers whose digits are stored in lists. For example: integer number 123is stored as 3::2::1. Establish the correctness of your solutions.

  • Assume you have been given a list of file and directory names along with the respective access control modes (as drwxrwxrwx). The storage structure is a list of pairs. For example [('assign1', -r--r--r--), ('lectureNotes', dr-xr--r--)] indicates two objects: the first object is a file with name assign1 and access permissions 444; the second object is a directory named lectureNotes with access permissions 544. Develop a python program to filter from the list only those objects that are files and change their access permissions to 755. Use Python’s in-built map and filter functionality for this problem.

  • Implement the reduce functionality of Python using recursion.

Previous
Next