Registry Synced

jan-2026-python-week-8-grpa-4

384 words
2 min read

GrPA 4

Course: Jan 2026 - Python
GrPA 4
Due Apr 08, 2026 at 11:59 PM IST
Instructions
Use "Test Run" to verify your code with public test cases.
Press "Submit" to have your assignment evaluated.
You can submit your assignment multiple times up until the deadline.
Make sure to submit your final code by the deadline to receive your score.
Summary
- out of100
Score
Public Tests
0/0 Passed
Private Tests
0/0 Passed

**Change in eligibility criteria to write oppe2 exam: A5>=40/100 AND A6>=40/100 AND A7>=40/100 AND A8>=40/100. and becoming eligible to give the end term exam. ** Write a function named num_to_words that accepts a square matrix of single digit numbers as argument. Within the function, create a file named words.csv. Write the matrix to the file by replacing the digits with their corresponding words. For example, num_to_words([[1, 2], [3, 4]]) should create the file words.csv with the following contents:
one,two
three,four
Note that the matrix will only have integers from 00 to 99, endpoints inclusive.

(1) You do not have to accept input from the user or print the output to the console. You just have to write the function definition. However, within the function, you have to create a file named words.csv and write to it.
(2) The last line of the file should not end with a '\n'. The last character of every other line in the file should end with a '\n'. This is a convention that we will be following in all questions that ask you to write to a file.

Public Tests ( 0/0 )

Case 1

Input:
text
public
[1, 2], [3, 4](/viewer?path=1, 2], [3, 4)

Case 1

Expected Output:
text
one,two
three,four

Case 2

Input:
text
public
[9, 7, 2], [1, 0, 5], [5, 2, 6](/viewer?path=9, 7, 2], [1, 0, 5], [5, 2, 6)

Case 2

Expected Output:
text
nine,seven,two
one,zero,five
five,two,six

🔒 Private Tests ( 0/0 )

This test case group is locked and will be revealed after the deadline.


💻 IITM Official Solution

Solution code is currently locked and will be available after the deadline.

💻 My Submitted Code

python
def num_to_words(mat):
    """
    Convert matrix to file

    Argument:
        mat: list of lists
    Return:
        None
    """

Document Outline
Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.