Repository navigation
சென்னை நேரம்: நள்ளிரவைக் கடக்கும்போது divmod எப்படி உதவுகிறது? #10
lmo0317
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
UTC நேரம் 23:45 என்றால் சென்னையில் அடுத்த நாள் காலை 05:15. சென்னையில் நள்ளிரவு 00:10 என்றால் UTC நேரம் என்ன? காகிதத்தில் கணக்கிட்டுவிட்டுக் கீழே உள்ள மூன்று சோதனைகளையும் இயக்கிப் பாருங்கள்.
This is a small, runnable Tamil/English companion example for the Python built-in
divmod. Chennai is 330 minutes ahead of UTC. The first number returned is the change of day: −1 for yesterday, 0 for today, +1 for tomorrow.இரண்டாவது சோதனையில் மொத்தம் −320 நிமிடங்கள்.
divmod(-320, 1440)தருவது(-1, 1120). ஏனென்றால் −320 = (−1 × 1440) + 1120. அதனால் விடை முந்தைய நாள் 18:40. Think of the remainder as the number of minutes since that day's midnight.Try one more without running the code: if the Chennai clock shows 05:29, what UTC day and time will the function return? Moving the clock just one minute forward changes the day in the answer. This exercise uses fixed offsets.
We wrote this example at ModuMath in South Korea. For learners who want to try another maths problem with a step-by-step explanation, here is our English practice page.
All reactions