An ordinal date consists of a year and a day within it, both of which are integers. The year can be any year in the Greg

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

An ordinal date consists of a year and a day within it, both of which are integers. The year can be any year in the Greg

Post by answerhappygod »

An ordinal date consists of a year and a day within it, both of
which are integers. The year can be any year in the Gregorian
calendar while the day within the year ranges from one, which
represents January 1, through to 365 (or 366 if the year is a leap
year) which represents December 31. Ordinal dates are convenient
when computing differences between dates that are a specific number
of days (rather than months). For example, ordinal dates can be
used to easily determine whether a customer is within a 90 day
return period, the sell-by date for a food-product based on its
production date, and the due date for a baby. Write a function
named ordinal Date that takes three integers as parameters. These
parameters will be a day, month and year respectively. The function
should return the day within the year for that date as its only
result. Create a main program that reads a day,month and year from
the user and displays the day within the year for that date. Your
main program should only run when your file has not been imported
into another program. solve this problem in python in
simplest form
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply