# CS 1112
# Learning Python (Python version: 3)
# Module 4: Strings ACTIVITY

# *****************************************
# ACTIVITY 1
# Write a function called cat_hat that takes in a string.
# This function returns True if "cat" and "hat" appear the same number of times in the string,
# otherwise return False

# Assume the string will only contain lowercase characters
# Hint: you may not need all these functions but consider using count(), and/or len()

# WRITE YOUR SOLUTION HERE FOR ACTIVITY 1:




# *****************************************
# ACTIVITY 2
# Write a function called is_palindrome() that takes in one string and checks if it is a palindrome.
# Remember, a string is a palindrome if the sequence of characters reads the same backwards as forwards
# For example, "racecar" and "kayak" are examples of strings that are palindromes.

# WRITE YOUR SOLUTION HERE FOR ACTIVITY 2:





# TEST YOUR SOLUTION USING THE CODE BELOW:
# Example usage
word = "radar"
if is_palindrome(word):
    print(word, "is a palindrome.")
else:
    print(word, "is not a palindrome.")


# *****************************************
# ACTIVITY 3
# Use string slicing with a negative step size that returns every 2nd item between
# positions 6 to 1 in reverse order.  Use the following string:  the_str = 'ABCDEFGHI'

# Hint: the output should be "GEC"

# WRITE YOUR SOLUTION HERE FOR ACTIVITY 3:


