The song Sam is playing is "Perfect".
Sam is doing a project. A project is written either in C++ or in Python. If Sam does a project written in Python, he will not use a Mac. Sam is using a Mac. If Sam uses a Mac, he will play a song. If a song is not "Perfect", Sam will never play it.
∃x (Project(x) ∧ Do(sam, x))  ∀x (Project(x) → (WrittenIn(x, python) ⊕ WrittenIn(x, c++)))  ∀x (Project(x) ∧ WrittenIn(x, python) ∧ Do(sam, x) → ¬Use(sam, mac))  Use(sam, mac)  Use(sam, mac) → ∃x (Song(x) ∧ Play(sam, x))  ∀x (¬Be(x, perfect) → ¬Play(sam, x))