Question: Write a function called two_alpha_categories(word) This function should check which half of the alphabet the first letter of the word parameter belongs to. i.e the

Write a function called two_alpha_categories(word)

This function should check which half of the alphabet the first letter of the word parameter belongs to. i.e the first half of the alphabet is a-m and the second half of the alphbet is n-z

When the first letter of the word is between a-m return 1 (as a integer).

When the first letter of the word is between n-z return 2 (as a interger).

For example:

Test Result
two_alpha_categories("Apple")
 
print (two_alpha_categories("Bear"))
1 
print(two_alpha_categories("Elephant"))
1

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!