Traditional Culture Encyclopedia - The 24 Solar Terms - Python beginning of spring solar terms

Python beginning of spring solar terms

Speaking of python, we all know that someone asks how to calculate age according to age. In addition, someone wants Python to calculate the age according to the date of birth. Do you know what is going on? In fact, how to calculate the zodiac according to age? Let's take a look at a program written in python to determine which zodiac a given year belongs to. I hope I can help you!

Python calculates the zodiac (year) according to age:

How to calculate the genus of returnu according to age? Monkeys, chickens, dogs, pigs, rats, cows, tigers, rabbits, dragons, snakes, horses and sheep [year% 12]

Xiao Sheng ()

How to calculate people's zodiac according to their actual age?

Divide his age by 12 to get the remainder, and then push it backwards.

For example, A is 14 years old this year, and the remainder of 14 divided by 12 is 2. This year is the year of the ox, so the cow will push the mouse and pig back. Therefore, people born in 1995 are either dogs or pigs. Basically, pigs were born after 1995, and dogs were born before.

How to calculate the zodiac according to age

First of all, you need to memorize the numbers represented by each zodiac: rat 1, cow 2, tiger 3, rabbit 4, dragon 5, snake 6, horse 7, sheep 8, monkey 9, chicken 10, dog 16 and pig 12. The older a single round is, the older it is.

For example, this year is the year of the pig, so the smallest pig is 1, the smallest dog is 2, the smallest chicken is 3 (and so on), and the smallest mouse is 13.

Different age groups of the same pig each round 12 years old. For example, this year is the year of the pig, so the youngest pig is 1 year old, the next round is 13 year old, the next round is 25 years old, and so on.

Zodiac year

1. Pupils:,,,,,,,

2. Ugly cattle:,,,,,,,,,

3. Silver Fox:,,,,,,,,,

4. Mao Tu:,,,,,,,,,,

5. Dragon:,,,,,,,,,

6. Snakes:,,,,,,,,,

7. afternoon horse:,,,,,,,,

8. Not a sheep:,,,,,,,,,

9. Monkey applications:,,,,,,,,,,

10. Unitary chicken:,,,,,,,

1 1. Dogs:,,,,,,

12. porcupine:,,,,,,,,

Python calculates the zodiac according to age: how to calculate the age according to the zodiac? Then there are ugly mice, ugly cows, tigers, furry rabbits ... and they are easy to calculate.

Hope to adopt

How to calculate the age by the zodiac?

By the time you 12 years old, you must be born in the zodiac. You can calculate the order of 12 zodiac signs. It is very simple to calculate according to the mathematical method, and the method is as follows:

1. First, remember the numbers represented by each zodiac: rat 1, ox 2, tiger 3, rabbit 4, dragon 5, snake 6, horse 7, sheep 8, monkey 9, chicken 10, dog1,pig/kloc.

For example, this year is the year of the horse. People born in the Year of the Horse 1 year old, 13 years old, 25 years old, etc. Generally speaking, the age of a horse is imaginary. The year of the horse constant is 13+7 = 20.

3. It's easy to know. For example, if the chicken is 10, 20- 10 = 10, then the person born in is 10, 22, 34 and so on.

4. Another example: Calculate the age of mice, 20- 1 = 19 years old. The age of the rat is: China Lunar Year of the Rat, 54 years old in Gregorian calendar and 55 years old in Gregorian calendar.

Precautions:

1. Calculate the age according to the zodiac, and determine the time of the zodiac from the moment you hand over to beginning of spring to the end before you hand over to beginning of spring in the following year. Think about these twelve animals: rats, cows, tigers, rabbits, dragons, snakes, horses, sheep, monkeys, chickens, dogs and pigs.

This year is the year of rat, so it is also the year of rat. Similarly, it is the year of the rat. This is the analogy method, and the difference between them is the cycle number of the zodiac 12.

The above is a program written in python to judge which zodiac a given year belongs to. The related content is about how to calculate the age according to the animal sign. After reading python, I hope this will help everyone!