1 Reply Latest reply: Apr 15, 2012 2:55 PM by cj RSS

    Help Coding

    930375
      Been working on this in Python for awhile, but I am getting no where, and would appreciate it if someone could help?

      Implement a function selectSome() that takes as a parameter a list of student names (i.e. strings) and a list of special characters. It prints those names in the first list that start with the letters in the second list. Capitalization shouldn't matter when selecting the names. If an empty list is provided as either parameter, the function doesn't print anything. The information below shows how you would call the function selectSome() and what it would display for some example parameters:
      selectSome(["Eva", "Sam", "Carly", "Tanya", "Owen", "Anna"], ['A', 'B', 'C', 'D', 'E', 'F'])
      Eva
      Carly
      Anna
      selectSome(["Hanna", "Bob", "chris", 'Fred', 'Alex'], ['a', 'F', 'C'])
      chris
      Fred
      Alex
      selectSome([], ['a', 'b', 'c'])
      selectSome(['Eva', 'Bob'], [])