The probability of getting a queen or a diamond is the sum of the probabilities of getting a queen and getting a diamond, subtracting the probability of getting a queen of diamonds(so we don't count it twice).
In a deck of cards we have 52 cards(13 of each suit). The probability of getting a queen is the amount of queens in the deck(4) divided by the total amount of cards(52).
The probability of getting a diamond, is the amount of diamond cards(13) divided by the total amount of cards(52).
And finally, the probability of getting a queen of diamonds is
Now, we just need to add the probabilities of getting a queen and getting a diamond, and subtract the probability of getting a queen of diamonds.
The probability of getting a queen or a diamond from a deck of cards is 4/13.