CS1010 – Bonus Challenge 3.1 Solved

$ 29.99
Category:

Description

Maya Calendar
The Long Count Calendar
The Mayans designed the Long Count calendar to track a long period of time which they call the Great Cycle or Universal Cycle. Each cycle is approximately 5,125 years.
Dates are written as five numbers separated by periods, such as 13.0.0.0.1 (The ancient Maya did not use Arabic numerals of course, but their own hieroglyphs).
The right-most position is called the k’in, which counts single days: 13.0.0.0.1, for example. The k’in counts up to 19 and then flips back to zero, with counting picked back up by the next position, the uinal. So 13.0.0.0.19 would become 13.0.0.1.0, much like a car odometer.
Each uinal is thus a block of 20 days. The k’in position then picks back up, counting up to that 20, which then gets added to the uinal. So the day after 13.0.0.1.0 would be 13.0.0.1.1 and then 13.0.0.1.2, all the way up to 13.0.0.1.19 and finally 13.0.0.2.0.
The uinals count upward as well. While the Maya generally use a base-20 counting system, Witschey said, they modify this slightly for the uinal, which only counts up to 17 before rolling over to the third position, the tun. Each tun is thus 18 blocks of 20 days, or 360 days âA˘ Tˇ approximately a year by the solar calendar.
Tuns, in turn, count up to 20 before rolling over into k’atuns. As 20 blocks of 360 days, each k’atun translates into 7,200 days, or just less than 20 years. The k’atun place then counts up before rolling over into the final digit, the b’ak’tun.
If that word sounds familiar, it’s because Dec. 21, 2012, on our calendar marks the end of the 13th b’ak’tun of the Mayan Long Count Calendar. In other words, it’s the day the count will read 13.0.0.0.0. On Dec. 22, it will read 13.0.0.0.1.
Each b’ak’tun is 144,000 days long, or a little less than 400 years. To the ancient Maya, 13 b’ak’tuns represented a full cycle of creation; one carving refers to a god associated with calendar changes returning that day. There are no apocalyptic prophecies, however. In fact, the Maya had several rarely used units that were even larger than b’ak’tuns, giving them the capacity to count millions of years into the future.
Source: https://www.livescience.com/25662-how-mayan-calendar-works.html
1
The functions is_leap_year , days_in_month and days_from_epoch from Problem Set 3 has been defined and available for you on Coursemology. So you do not need to copy them into your solution box.
Example:
greg_to_mayan(21, 12, 2012);
13.0.0.0.0
Task 2: Mayan to Gregorian (3 marks)
Example:
mayan_to_greg(13, 0, 0, 0, 0);
Footnote

Reviews

There are no reviews yet.

Be the first to review “CS1010 – Bonus Challenge 3.1 Solved”

Your email address will not be published. Required fields are marked *