Technically you can use both of them in the sentences.
Though to me, "like" seems to sound better. For me "such as" in these sentences sounds awkward. This may be because of my young age, and my generations tendency to overuse the word "like"!
Student or Learner