Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SIGNS = '03,21-04,19=ARI;04,20-05,20=TAU;05,21-06,21=GEM;06,22-07,22=CAN;' + '07,23-08,22=LEO;08,23-09,22=VIR;09,23-10,23=LIB;10,24-11,20=SCO;' + '11,21-12,21=SAG;12,22-01,20=CAP;01,21-02,21=AQU;02,22-03,20=PIS;' def find_astrological_sign(month, date): ''' (int, int) -> str Given two int values representing a month and

SIGNS = '03,21-04,19=ARI;04,20-05,20=TAU;05,21-06,21=GEM;06,22-07,22=CAN;' + \ '07,23-08,22=LEO;08,23-09,22=VIR;09,23-10,23=LIB;10,24-11,20=SCO;' + \ '11,21-12,21=SAG;12,22-01,20=CAP;01,21-02,21=AQU;02,22-03,20=PIS;' def find_astrological_sign(month, date): ''' (int, int) -> str Given two int values representing a month and a date, return a 3-character string that gives us what star sign a person born in that month and on that date belongs to. Use the SIGNS string (already defined for you at the top of this file) to figure this out. NOTE: A lot of string slicing to do here. The information for each sign is exactly 16 characters long. >>> find_astrological_sign(8, 24) 'VIR' >>> find_astrological_sign(1, 15) 'CAP' ''' Looking for a way to complete this function without the use of lists

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions

Question

Let{X(t), Answered: 1 week ago

Answered: 1 week ago

Question

1. Define and explain culture and its impact on your communication

Answered: 1 week ago