0
0
Redisquery~10 mins

SISMEMBER for membership check 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 check if 'user1' is a member of the set 'online_users'.

Redis
SISMEMBER online_users [1]
Drag options to blanks, or click blank then click option'
Auser1
Buser2
Cadmin
Dguest
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong member name.
Forgetting to specify the member argument.
2fill in blank
medium

Complete the code to check if 'admin' is a member of the set 'user_roles'.

Redis
SISMEMBER [1] admin
Drag options to blanks, or click blank then click option'
Auser_roles
Bactive_sessions
Conline_users
Dguest_list
Attempts:
3 left
💡 Hint
Common Mistakes
Using a set name that does not contain roles.
Swapping the order of arguments.
3fill in blank
hard

Fix the error in the command to check if 'guest' is a member of 'guest_list'.

Redis
SISMEMBER guest_list [1]
Drag options to blanks, or click blank then click option'
Aguest_list
Bguest_list guest
Cguest
Dlist_guest
Attempts:
3 left
💡 Hint
Common Mistakes
Providing both set and member as one argument.
Using the set name instead of the member.
4fill in blank
hard

Fill both blanks to check if 'user42' is a member of the set 'active_users'.

Redis
SISMEMBER [1] [2]
Drag options to blanks, or click blank then click option'
Aactive_users
Buser42
Cinactive_users
Duser24
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping set name and member name.
Using wrong set or member names.
5fill in blank
hard

Fill all three blanks to check if 'john_doe' is a member of the set 'registered_users' and store the result in variable 'is_member'.

Redis
is_member = [1] [2] [3]
Drag options to blanks, or click blank then click option'
ASISMEMBER
Bregistered_users
Cjohn_doe
Duser_status
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong command name.
Mixing up set and member names.
Forgetting to assign the result to a variable.