CBSE Class 11 Computer Science
Question 33 of 63
Introduction to Python Modules — Question 2
Back to all questions# days.py
def calculate(total_days):
months = total_days // 30
remaining_days = total_days % 30
return months, remaining_days# calculate.py
from days import calculate
total_days = int(input("Enter the total number of days: "))
months, remaining_days = calculate(total_days)
print("Total number of months:", months)
print("Remaining days:", remaining_days)Enter the total number of days: 100
Total number of months: 3
Remaining days: 10