We have,
Total possible outcomes =52
Number of favorable outcomes for a diamond or a spade =13+13=26
So, number of favorable outcomes=26
Hence, P(getting a diamond or a spade) =26/52=1/2