0
0
Redisquery~10 mins

ZADD for adding scored members 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 with a score to a sorted set.

Redis
ZADD myset 10 [1]
Drag options to blanks, or click blank then click option'
Ascore
Bmember
C10
Dmember1
Attempts:
3 left
💡 Hint
Common Mistakes
Putting the score after the member name.
Using a number as the member name.
2fill in blank
medium

Complete the code to add a member with score 15 to the sorted set named 'players'.

Redis
ZADD players 15 [1]
Drag options to blanks, or click blank then click option'
Amember1
Bscore
Cplayer1
Dplayer
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the score and member positions.
Using 'score' as the member name.
3fill in blank
hard

Fix the error in the command to add member 'user42' with score 20 to 'ranking'.

Redis
ZADD ranking 20 [1]
Drag options to blanks, or click blank then click option'
Aranking
Buser24
C20
Duser42
Attempts:
3 left
💡 Hint
Common Mistakes
Using the score as the member name.
Using the key name as the member.
4fill in blank
hard

Fill both blanks to add member 'alice' with score 30 to the sorted set 'users'.

Redis
ZADD [1] [2] alice
Drag options to blanks, or click blank then click option'
Ausers
Bmembers
C30
Duserset
Attempts:
3 left
💡 Hint
Common Mistakes
Putting the member name in the wrong place.
Duplicating the score number.
5fill in blank
hard

Fill all three blanks to add member 'bob' with score 25 to the sorted set 'leaders'.

Redis
ZADD [1] [2] [3]
Drag options to blanks, or click blank then click option'
Aleaders
B25
Cbob
Dmembers
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the score and member positions.
Using the wrong key name.