Registry Synced

jan-2026-python-week-7-numbers-1

487 words
2 min read

Numbers 1

Course: Jan 2026 - Python
Numbers 1
Submission deadline has passed for this assignment
Due Apr 01, 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
100 out of100
Score
Public Tests
3/3 Passed
Submitted on Apr 01, 2026 at 3:46 AM IST
Private Tests
1/1 Passed
Submitted on Apr 01, 2026 at 3:46 AM IST

**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.


Seconds to Minute-Seconds**
Given an integer seconds, return a tuple (minutes, remaining_seconds) where minutes is the number of full minutes in seconds, and remaining_seconds is the leftover seconds.
Example
seconds = 125
125 seconds is 2 minutes and 5 seconds, so the result is (2, 5).
Template Code(Click to Expand)


def seconds_to_minute_seconds(seconds: int) -> tuple:
    '''
    Given an integer representing seconds, return a tuple of (minutes, seconds).

    Arguments:
    seconds: int - an integer representing the number of seconds.

    Return: tuple - a tuple of (minutes, remaining_seconds).
    '''
    ...


NOTE: You can use the below tools for working out and debugging. Click to open them in new tab.

Public Tests ( 3/3 )

Case 1

Input:
text
seconds = 3600
is_equal(
    seconds_to_minute_seconds(seconds),
    (60, 0)
)

Case 1

Expected Output:
text
(60, 0)

Case 1

Actual Output:
text
(60, 0)

Case 2

Input:
text
seconds = 75
is_equal(
    seconds_to_minute_seconds(seconds),
    (1, 15)
)

Case 2

Expected Output:
text
(1, 15)

Case 2

Actual Output:
text
(1, 15)

Case 3

Input:
text
seconds = 0
is_equal(
    seconds_to_minute_seconds(seconds),
    (0, 0)
)

Case 3

Expected Output:
text
(0, 0)

Case 3

Actual Output:
text
(0, 0)

Private Tests ( 1/1 )

Case 1

Input:
text
seconds = 1000
is_equal(
    seconds_to_minute_seconds(seconds),
    (16, 40)
)

Case 1

Expected Output:
text
(16, 40)

Case 1

Actual Output:
text
(16, 40)

💻 IITM Official Solution

python


def seconds_to_minute_seconds(seconds: int) -> tuple:
    '''
    Given an integer representing seconds, return a tuple of (minutes, seconds).

    Arguments:
    seconds: int - an integer representing the number of seconds.

    Return: tuple - a tuple of (minutes, remaining_seconds).
    '''


    minutes = seconds // 60
    remaining_seconds = seconds % 60
    return (minutes, remaining_seconds)


💻 My Submitted Code

python
def seconds_to_minute_seconds(seconds: int) -> tuple:
    # Floor division gives the total full minutes
    minutes = seconds // 60
    # Modulo gives the remaining seconds
    remaining_seconds = seconds % 60
    return (minutes, remaining_seconds)

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.