0
0
Redisquery~10 mins

SMEMBERS to list all 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 get all members of the set named 'fruits'.

Redis
SMEMBERS [1]
Drag options to blanks, or click blank then click option'
Afruits
Bfruits_set
Cfruit_set
Dfruit
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong set name like 'fruit' or 'fruits_set'.
Adding extra spaces or quotes around the key.
2fill in blank
medium

Complete the code to retrieve all members from the set stored in the variable 'myset'.

Redis
SMEMBERS [1]
Drag options to blanks, or click blank then click option'
Aset_my
Bmy_set
Cmyset
Dmyset1
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'my_set' instead of 'myset'.
Adding suffixes like '1' to the key name.
3fill in blank
hard

Fix the error in the command to list all members of the set 'colors'.

Redis
SMEMBERS [1]
Drag options to blanks, or click blank then click option'
Acolor
Bcolors
Ccolour
Dcolours
Attempts:
3 left
💡 Hint
Common Mistakes
Using singular 'color' instead of plural 'colors'.
Using British English spellings like 'colour' or 'colours'.
4fill in blank
hard

Fill both blanks to get all members of the set named 'animals' and store the result in a variable.

Redis
result = [1] [2]
Drag options to blanks, or click blank then click option'
ASMEMBERS
Banimals
CANIMALS
Dgetmembers
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'getmembers' which is not a Redis command.
Using uppercase 'ANIMALS' which is a different key.
5fill in blank
hard

Fill both blanks to get all members of the set 'cities', convert them to a list, and assign to variable 'city_list'.

Redis
city_list = list([1]([2]))
Drag options to blanks, or click blank then click option'
Aredis_client.smembers
B'cities'
C)
Dcities
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting parentheses after the method name.
Passing the set name without quotes.
Using the variable 'cities' instead of the string key.