Skip to content

Week 3 Python Graded Assignment GRPA 4

week 3 Python Graded Assignments GRPA 4 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 4 – Loops Application – GRADED

You are tasked with writing a program that can handle various tasks based on the input. The first line of the input represents the task to be performed. The possible tasks are:

  1. factors – Find the factors of a number n (including 1 and itself) in ascending order.
  2. find_min – Take n numbers from the input and print the minimum number.
  3. prime_check – Check whether a given number is prime or not.
  4. is_sorted – Check if all characters of the given string from input are in alphabetical order. Print the output as “True” or “False” accordingly.
  5. any_true – Take n numbers from input and check if any of the numbers are divisible by 3. Print the output as “True” or “False” accordingly.
  6. manhattan – Take inputs directions such as “UP”, “DOWN”, “LEFT” and “RIGHT” from the input until the input is “STOP”. Assume you are starting from (0,0) in a cartesian coordinate. Find the Manhattan distance between the starting point and the ending point by following the steps in the cartesian plane.

Write a program to solve these tasks. Use loops where necessary.