0
0
Redisquery~10 mins

SADD and SREM for membership in Redis - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to add a member to a Redis set named 'fruits'.

Redis
SADD fruits [1]
Drag options to blanks, or click blank then click option'
Abanana
Bapple
Corange
Dgrape
Attempts:
3 left
💡 Hint
Common Mistakes
Using a command other than SADD to add members.
Forgetting to specify the member to add.
2fill in blank
medium

Complete the code to remove a member from the Redis set 'fruits'.

Redis
SREM fruits [1]
Drag options to blanks, or click blank then click option'
Abanana
Bkiwi
Cpear
Dmelon
Attempts:
3 left
💡 Hint
Common Mistakes
Using SADD instead of SREM to remove members.
Trying to remove a member that is not in the set.
3fill in blank
hard

Fix the error in the command to add 'orange' to the 'fruits' set.

Redis
SADD [1] orange
Drag options to blanks, or click blank then click option'
Afruitset
Bfruit
Cfruit_set
Dfruits
Attempts:
3 left
💡 Hint
Common Mistakes
Using a singular or misspelled set name.
Omitting the set name entirely.
4fill in blank
hard

Fill both blanks to add 'kiwi' and then remove 'apple' from the 'fruits' set.

Redis
SADD fruits [1]
SREM fruits [2]
Drag options to blanks, or click blank then click option'
Akiwi
Bapple
Cbanana
Dorange
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the members to add and remove.
Using the wrong command for adding or removing.
5fill in blank
hard

Fill all three blanks to add 'grape', remove 'melon', and add 'pear' to the 'fruits' set.

Redis
SADD fruits [1]
SREM fruits [2]
SADD fruits [3]
Drag options to blanks, or click blank then click option'
Agrape
Bmelon
Cpear
Dapple
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the order of commands.
Using SREM to add members or SADD to remove.