Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- zodiac = {'aries': 'compatible with Gemini, Sagittarius, Leo. business person.',##There are 12 keys with values that are each of the 12 zodiac signs. The values of each of the keys is for best romantic picks and jobs.
- 'leo': 'compatible with Sagittarius, Aries, Gemini. performer.',##I tried to arrange each key at beginning of line to look better.
- 'sagittarius': 'compatible with Aries, Aquarius, Leo. animal training.',##shortened some of the values from previously
- 'cancer': 'compatible with Taurus, Scorpio, Virgo. Social work.',
- 'scorpio': 'compatible with Cancer, Capricorn, Pisces. detectives.',
- 'pisces': 'compatible with Scorpio, Cancer, Capricorn. natural artists.',
- 'taurus': 'compatible with Cancer, Capricorn, Pisces. great teacher.',
- 'virgo': 'compatible with Taurus, Cancer, Capricorn. Great television critics.',
- 'capricorn': 'compatible with Taurus, Pisces, Virgo. good managers.',
- 'gemini': 'compatible with Pisces, Virgo, Scorpio. Architects.',
- 'libra': 'compatible with Pisces, Cancer, Taurus. diplomat.',
- 'aquarius': 'compatible with Sagittarius, Libra, Gemini. Scientist or inventor.',}
- while True:##I placed everything in a while loop like you suggested to make the whole thing better.
- print('Hello and welcome to the zodiac compatibility and career wizard')##This is the initial welcome to the user
- print('These are the zodiac signs.')##lets user know list of keys are only ones
- for k in zodiac.keys():##prints keys
- print(k)
- print('Enter Your Sign: (blank to quit)')##This gives the user a chance to quit
- sign = input()##sign is assigned the value given by the user
- if sign == '':##if they press retun with a blank it ends
- break
- if sign in zodiac:##Checks to see if sign in dictionary data, I did not add a way to add a key because there are no more zodiac signs.
- print(zodiac[sign])##this prints the information for the user zodiac
- else:
- print('I do not have information for ' + sign)##error message
- print('Thank you I hope you enjoyed the information!')##goodbye message to the user
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement