The Joy of Computing with Python Unproctored exam (10-11 am) Review | Question paper and answer given

Swayam portal logo


     Basically the exam is little easy for those who are solved the programming assignment by their own.  In my view it is little easy. Maximum time to finish the assignment is 15 to 20 minutes for  those who are solved the programming assignment by their own.

     Now we are going to see the question and answer(my solution) for morning session. This blog will help for upcoming batches, to know how was the unproctored exam.  This is open resource exam and 1 hour duration. 

     *Read Also -> Joc evening session review (question and answer included) 

     *Read Also -> Joc Proctored exam (Dec 19, 2020) Review

     Note:

     In future batches they may ask more questions or less questions but any number of questions they ask that can be solved within 1hour. Because they fix the questions in that way. For this session (Dec 2020) morning 10-11am Unproctored exam, they asked only one question to solve.

     Note:

     This is for only educational purpose. The question and answer for the exam  in this blog is posted  only after the exam is completed i.e. after 11 am for morning session.

Question paper and answer for nptel JOC Unproctored exam 10-11 AM

Programming exam 1: Decode the script

Nandini has a complex matrix script.  The matrix script is a N x N grid of strings.  It consists of alphanumeric characters and symbols(!,@,#,$,%,&).  To decode the script, Nandini needs to read each column and select only the alphanumeric characters and connect them, she n=reads the column from top to bottom and starts reading from the leftmost column.  If there are symbols in the decoded script, then Nandini removes them for better readability.  Alphanumeric characters consist of (A-Z, a-z and 0-9) 

Input Format:

The first line contains space-separated integers N (rows) and M (columns) respectively. 
The next N lines contain the row elements of the matrix script separated by space.

Output Format:

Print the decoded matrix script.
Sample Input:
7 3
T s i
h % x
i  # $
s M #
$ a  &
# t %
i r !

Output:

ThisisMatrix

Answer (my own solution) :

a,b=map(int,input().split())
l=[]
for i in range(a):
  c=input().split()
  l.append(c)
ans=[]
for j in range(b):
  for i in range(a):
    if l[i][j].isalpha():   #checking alphabet
      ans.append(l[i][j])
    elif l[i][j].isdigit():   #checking number
      ans.append(l[i][j])
    else:
      pass
print("".join(ans),end="")


     This answer passed in both public and private test cases.  There are many ways to solve this problem not only this.


     *Also Read -> Joc evening session review (question and answer included) 

     *Also Read -> Joc Proctored exam (Dec 19, 2020) Review

------------------------------------------------------------------------------------------------------------------
Content Last Updated on 5th August 2021, 3:00 PM IST

Post a Comment

Previous Post Next Post