Skip to content

Week 3 Python Graded Assignment GRPA 3

week 3 Python Graded Assignments GRPA 3 IIT Madras Complete  Solutions Are Discussed In the Drive Link Given Below See Bottom And Request  We Hope This Might Help You All In Matching Answers . Or For Some Others Reasons Not Able To Complete Graded Assignments 

GrPA 3 – Nested loops – GRADED

Create a multi-functional program that performs different tasks based on the user input. The program should support the following tasks:

  1. Permutation (permutation): Given a string s, print all the possible two-letter permutations(without repitition) of the letters in the string.
  2. Sorted Permutation (sorted_permutation): Given a string s, print all the possible two-letter permutations(without repetition) of the letters in the string where the first character comes before the second one in alphabetical order. The order in which the permutations are printed is same as the previous one (Type: Filtering).
  3. Repeat the Repeat (repeat_the_repeat): Given a number n, print the numbers from 1 to n in the same line and repeat this n times.
  4. Repeat Incrementally (repeat_incrementally): Given a number n, print a pattern where the k-th line contains the first k numbers and there are n lines in total. For example, if n is 4, the output should be:
    1
    12
    123
    1234
    
  5. Increment and Decrement (increment_and_decrement): Given a number n, print a pattern where the k-th line should have the numbers from 1 to k and then back down to 1. For example, if n is 4, the output should be:
    1
    121
    12321
    1234321