CPSC120A
Fundamentals of Computer Science I

Post-lab 19

Strings

Do one of the following programming problems:

Odd Characters

Write a function called get_odd_characters(a_string), which takes a string as a parameter. Your function should return a string, which is the characters from a_string with only characters from odd indices included.


Count Character

Write the function count_character(text, character). The function should return the number of times that the string of length 1, character, occurs in the string of abitrary length, text.