Fortune Telling Collection - Zodiac Analysis - Introduce constellations in python.
Introduce constellations in python.
* * * * * * * * * * * * * * Enter the date of birth, and you can know the zodiac, constellation, constellation symbols, and constellation features * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
"""
F 1= "energetic constellation. Personality and love are mostly "rampaging", but simple personality is harmless, so don't worry too much. "
F2= "A leisurely constellation. Everything is always considered before screening, and it is a late bloomer. They have superhuman stability, and once they make a bet, they will surely win. "
F3= "A constellation that changes as fast as the wind. Gemini's dual personality often gives others and themselves a headache. It should be good if you are willing to pay more attention to your career and love, but ... they are too smart. "
F4= "A constellation that needs love and stability very much. Suspicion makes them feel insecure everywhere in their life journey. However, a cancer with a brilliant maternal love is willing to pay for what it loves. "
F5= "Pay attention to the magnificent constellations. The lion is the king of the forest, and naturally likes to call friends. Some of them can't stand loneliness. They are aggressive and careless, but they are loyal and popular. "
F6= "A little picky, the pursuit of perfect constellation. Lack of self-confidence in personality, often subconsciously blame themselves for not being beautiful enough; Although it will inevitably make you feel heavy, the natural advantage is that you can put it down and not be depressed. "
F7= "A constellation that loves beauty and fears emptiness. With his natural diplomatic talent, he can deal with all kinds of people; But sometimes because I worry too much about everything, I feel thankless, my brain is always turning around, and I am careful of neurasthenia. "
F8= "Mysterious and mysterious constellation, which makes people doubt and guess. They can be persistent or destructive; In the country of love, black and white are distinct, and there is no gray area. They are quite clear about their goals, and once they are established, they will go forward bravely. "
F9= "The constellation of freedom, romance and promiscuity. Their carefree personality makes them afraid of being tied up, and their affectionate nature makes them look for prey everywhere; Naive temperament often hurts people unconsciously. Love them and let them go. "
F 10= "rigorous and rigid, stable and mature constellation. Although they always give people a dull impression, dull people generally don't play tricks; No matter in career or love, they also win by virtue of this special temperament. "
F 1 1= "A constellation with advanced thinking and rational self-esteem. The same love is not bound, the same fraternity, but they are still different from Sagittarius; They pay more attention to spiritual improvement, which is a good inspiration. "
F 12= "Sentimental, sensitive, dreamy and dreamy constellation. Naturally affectionate, they often struggle with love words, and the ups and downs of emotions are inseparable; But they are weak by nature, like to pay, and will not hurt people at will. "
A=[' Aries',' Taurus',' Gemini',' Cancer',' Leo',' Virgo',' Libra',' Scorpio',' Sagittarius',' Capricorn',' Aquarius',' Pisces']
B={' Aries': f 1,' Taurus': f2,' Gemini': f3,' Cancer': f4,' Leo': f5,' Virgo': f6,' Libra': f7,' Scorpio': f8,' Sagittarius':
def? Sx (year):
y? =? (year-1972)% 12? # Remainder 12
Return? shx[y]? # Take the corresponding zodiac signs from the dictionary shx in turn, such as: 1972, that is, take "mouse" if the remainder is 0.
def? Xz (month, day):
d? =? (20, 19,2 1,20,2 1,22,23,23,23,24,23,22)? # List the date of separation of constellations every month in chronological order, starting from Aquarius (65438+ 10 month).
c? =? (Capricorn, Aquarius, Pisces, Aries, Taurus, Gemini, Cancer, Leo, Virgo, Libra, Scorpio, Sagittarius)
#a=[' Aries',' Taurus',' Gemini',' Cancer',' Leo',' Virgo',' Libra',' Scorpio',' Sagittarius',' Capricorn',' Aquarius',' Pisces']
#i=a.index(xz (month, day))
#print(chr(9800+i), ":",end=xz (month, day))
#? Write the constellation corresponding to the separation date in List C with the separation date in List D, for example, Capricorn is before the 20th of the first Aquarius.
What if? Date & ltd[month- 1]:? # If not. 1. 19, take 20 of 1 in d.
Return? c[month- 1]? The date before # 20, that is, Capricorn corresponding to C.
Otherwise:
Return? C[ month]? # Or the next Aquarius after the 20th.
shx? =? {0: mouse, 1: cow, 2: tiger, 3: rabbit, 4: dragon, 5: snake, 6: horse, 7: sheep, 8: monkey and 9: chicken.
sr? =? Enter ("Please enter your birthday (format: 1992. 10.23):")
t? =? sr.split(“.”)? # Slice, divide the service request by "."and turn it into three strings.
Year? =? int(t[0])
Month? =? int(t[ 1])
Dating? =? int(t[2])
Print? ("Your zodiac sign is:% s"%? Sx (year))
Print? ("Your constellation is:% s"%? Xz (month, day))
I=a.index(xz (month, day))
Print(chr(9800+i), ":",end=xz (month, day))
Print ('\n')
Print ("{0} is {1}". Format (xz (month, day), b.get (xz (month, day)))
- Related articles
- Aquarius male appearance
- How to use the wis blackhead removal suit? How to use wis Blackhead Removal Kit
- Broadcast twelve constellations _ broadcast twelve constellations TV series.
- What are the performances of single girls in 12 constellation?
- 12 constellation describes himself as handsome?
- What does your logo stand for?
- 12 What is the most desired love of the constellation?
- When you are excellent, the beauty of the world will come to you. Which constellations will make progress and work hard?
- Spooky and single-minded, if you fall in love with someone, you won't break up casually. What constellations are good life partners?
- The question of probability, what is the probability of all 12 constellations for 24 people in the class? Better give a formula!