Skip to content
TECHONESPOT
All Tech at one spot
HOME
CBSE
Class6th
Class7th
Class8th
Class9th
Class10th
Class11th
Commerce
Informatics Practices
Class 11th PHYSICAL EDUCATION
Science
Computer Science
Biology
Physics
Chemistry
Mathematics
English
PE
Class12th
Commerce
English
Accountancy
Business Studies
Economics
Informatics Practices
Entrepreneurship
Class 12th Physical Education
Science
Computer Science
GSEB
Class 7th GSEB
Class 8th GSEB
Class9th GSEB
Class10th GSEB
Class11th GSEB
Class12th GSEB
ACCOUNTS
STATISTICS
ORGANIZATION OF COMMERCE AND MANAGEMENT
ECONOMICS
ENGLISH
HINDI
GUJARATI
COMPUTER
ICSE
Books
BOOKS_GSEB
Books_CBSE
Courses
Basic Courses
Data Analysis
Excel
Python
SQL
Power BI
HTML
CSS
Oracle
SQL
Python
C++
C Language
Java
BCA
Semester-1
Semester-2
Semester-3
Semester-4
Semester-5
Semester-6
Application’s
SOFTWARE
About us
Privacy Policy
Contact us
Terms and Conditions
Write a Python program to convert days into years, weeks and days.
#Static
day = 400
year = (day//365)
weeks = (day % 365)//7
days = day-((year * 365) + (weeks*7))
print(“Year :- “,year)
print(“weeks :-“,weeks)
print(“Day :-“,days)
#Dynamic
day = int(input(“Enter the days :- “))
year = (day//365)
weeks = (day % 365)//7
days = day-((year * 365) + (weeks*7))
print(“Year :- “,year)
print(“weeks :-“,weeks)
print(“Day :-“,days)