0
0
Redisquery~10 mins

SET and GET commands 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 set the key "name" with the value "Alice" in Redis.

Redis
SET name [1]
Drag options to blanks, or click blank then click option'
Avalue
B"Alice"
Cname
DAlice
Attempts:
3 left
💡 Hint
Common Mistakes
Quoting the string value unnecessarily
Using the key name as the value
2fill in blank
medium

Complete the code to get the value of the key "name" from Redis.

Redis
[1] name
Drag options to blanks, or click blank then click option'
ASET
BDEL
CGET
DEXPIRE
Attempts:
3 left
💡 Hint
Common Mistakes
Using SET instead of GET
Using DEL which deletes keys
3fill in blank
hard

Fix the error in the command to set the key "age" to 30 in Redis.

Redis
SET age [1]
Drag options to blanks, or click blank then click option'
A30
Bthirty
Cage
D"30"
Attempts:
3 left
💡 Hint
Common Mistakes
Quoting numeric values unnecessarily
Using the key name as the value
4fill in blank
hard

Fill both blanks to set the key "city" to "Paris" and then get its value.

Redis
SET city [1]
[2] city
Drag options to blanks, or click blank then click option'
A"Paris"
BGET
CSET
Dcity
Attempts:
3 left
💡 Hint
Common Mistakes
Quoting the value unnecessarily in SET
Using SET instead of GET to retrieve
5fill in blank
hard

Fill all three blanks to set the key "language" to "Redis", get it, and then delete it.

Redis
SET language [1]
[2] language
[3] language
Drag options to blanks, or click blank then click option'
A"Redis"
BGET
CDEL
DSET
Attempts:
3 left
💡 Hint
Common Mistakes
Quoting the value unnecessarily in SET
Using SET instead of GET or DEL
Forgetting to delete the key