Complete the code to get one random member from the set 'colors'.
SRANDMEMBER [1]The command SRANDMEMBER colors returns one random element from the set named 'colors'.
Complete the code to get 3 random members from the set 'fruits'.
SRANDMEMBER [1] 3
The command SRANDMEMBER fruits 3 returns 3 random members from the set named 'fruits'.
Fix the error in the command to get 2 random members from the set 'animals'.
SRANDMEMBER animals [1]The count argument must be a number. Using 2 correctly requests 2 random members.
Fill both blanks to get 2 unique random members from the set 'cities'.
SRANDMEMBER [1] [2]
Using SRANDMEMBER cities 2 returns 2 unique random members from the set 'cities'. Negative counts return repeated members.
Fill both blanks to get 3 random members from the set 'numbers', allowing duplicates.
SRANDMEMBER [1] [2]
Using SRANDMEMBER numbers -3 returns 3 random members from the set 'numbers', allowing duplicates.