Final answer:
There are 36 rock songs, 9 country songs, 27 hip-hop songs, and 18 electronica songs in Diego's playlist of 90 songs.
Step-by-step explanation:
There are 40% rock songs, which is 40% of 90 songs.
To find out how many rock songs there are, you can multiply the percentage by the total number of songs: 40% * 90 songs = 0.4 * 90 = 36 rock songs.
Similarly, there are 10% country songs and 30% hip-hop songs, so you can use the same method to find out how many songs are in each genre.
The rest of the songs, which is 20% (100% - 40% - 10% - 30%), or 0.2 * 90 = 18 songs, are electronica songs.