Question: Design a function called print_longer that will take as arguments two strings and will print the string that is the longer of the two. If

Design a function called print_longer that will take as arguments two strings and will print the string that is the longer of the two. If the strings are both the same length, the string that is the first argument is printed. You will want to use Pythons built-in len function to get the length of each string.

Examples of using len:

>>> len('hi')

2

>>> len('hello there')

11

Example call to print_longer:

>>> print_longer('hey there', 'hello')

hey there

2. Design a function called print_zodiac_sign that will take two arguments: one for the month as a String and one for the day. The function should print the name of the zodiac sign for the specified month and day (you are not printing the image). Your design can assume the function will be called with a valid date, you need not test for invalid dates, but you must test all boundary cases for valid dates. NOTE: spelling mistakes will result in failed tests when your submission is graded ensure you spelled all of the signs correctly in your program! Example:

>>> print_zodiac_sign('May', 4)

Taurus

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!