0
0
DynamoDBquery~10 mins

Expression attribute values in DynamoDB - Interactive Code Practice

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

Complete the code to define an expression attribute value for a DynamoDB query.

DynamoDB
expression_attribute_values = {':val': [1]
Drag options to blanks, or click blank then click option'
AJohn
B:John
C"John"
D'John'
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to put quotes around string values.
Using single quotes instead of double quotes.
2fill in blank
medium

Complete the code to set a numeric expression attribute value for a DynamoDB update.

DynamoDB
expression_attribute_values = {':num': [1]
Drag options to blanks, or click blank then click option'
A"123"
B123
C'123'
D:123
Attempts:
3 left
💡 Hint
Common Mistakes
Putting numbers inside quotes, making them strings.
Adding colons inside the value.
3fill in blank
hard

Fix the error in the expression attribute values dictionary to correctly represent a boolean value.

DynamoDB
expression_attribute_values = {':active': [1]
Drag options to blanks, or click blank then click option'
A"true"
B"True"
Ctrue
DTrue
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase true without quotes (invalid in Python).
Using strings instead of boolean literals.
4fill in blank
hard

Fill both blanks to create expression attribute values for a string and a number.

DynamoDB
expression_attribute_values = {':name': [1], ':age': [2]
Drag options to blanks, or click blank then click option'
A"Alice"
B25
D'Alice'
Attempts:
3 left
💡 Hint
Common Mistakes
Using single quotes for strings.
Putting numbers inside quotes.
5fill in blank
hard

Fill all three blanks to define expression attribute values for a string, a boolean, and a number.

DynamoDB
expression_attribute_values = {':user': [1], ':isAdmin': [2], ':score': [3]
Drag options to blanks, or click blank then click option'
A"Bob"
BTrue
C100
D'Bob'
Attempts:
3 left
💡 Hint
Common Mistakes
Using single quotes for strings.
Using strings for booleans.
Putting numbers inside quotes.