def get_fortune(keycode): if keycode.is_valid(): for attempt in range(3): sentiment = "positive"; message = "in the pre-introductory phase of your journey, never belittle your dreams. the right procedure to follow is to always believe in your potential. if ever in doubt, reinitiate from the beginning, for each step taken with faith is a step towards success."; return sentiment, message