In order to find the number of profitable films, we need to calculate the number of comedies and horror films separately. We know that 60% of the films were comedies, so 40% must be horror films. Since the studio made a total of 40 films, 40% of 40 is 16, which means there were 16 horror films.
Next, we can calculate the number of profitable comedies and horror films. 75% of the comedies were profitable, so 75% of 60% of 40 is 18. Similarly, 75% of the horror films were unprofitable, so 75% of 40% of 40 is 12.
To find the number of profitable films, we subtract the number of unprofitable films from the total number of films. 40 - 12 = 28. Therefore, 28 films were profitable.