0
0
No-Codeknowledge~10 mins

Creating and displaying data in No-Code - Interactive Practice

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

Complete the code to create a list of fruits.

No-Code
fruits = [[1]]
Drag options to blanks, or click blank then click option'
Aapple, banana, cherry
B"apple", "banana", "cherry"
C"apple" "banana" "cherry"
Dapple; banana; cherry
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting quotes around strings
Using semicolons instead of commas
Not separating items with commas
2fill in blank
medium

Complete the code to display the first fruit in the list.

No-Code
print(fruits[[1]])
Drag options to blanks, or click blank then click option'
A0
B1
C-1
D2
Attempts:
3 left
💡 Hint
Common Mistakes
Using 1 instead of 0 for the first item
Using negative indexes without understanding
Using an index out of range
3fill in blank
hard

Fix the error in the code to display all fruits separated by commas.

No-Code
print([1](", ", fruits))
Drag options to blanks, or click blank then click option'
Asplit
Breplace
Cappend
Djoin
Attempts:
3 left
💡 Hint
Common Mistakes
Using split instead of join
Calling join on the list instead of the string
Using append which adds items to a list
4fill in blank
hard

Fill both blanks to create a dictionary with fruit names as keys and their colors as values.

No-Code
fruit_colors = [1]: [2]
Drag options to blanks, or click blank then click option'
A{"apple": "red", "banana": "yellow", "cherry": "red"}
B["apple", "banana", "cherry"]
C["red", "yellow", "red"]
D("apple", "banana", "cherry")
Attempts:
3 left
💡 Hint
Common Mistakes
Using lists or tuples instead of a dictionary
Not using colons between keys and values
Using square brackets which create lists
5fill in blank
hard

Fill all three blanks to create a list of dictionaries, each with a fruit and its color.

No-Code
fruits = [[1], [2], [3]]
Drag options to blanks, or click blank then click option'
A{"name": "apple", "color": "red"}
B{"name": "banana", "color": "yellow"}
C{"name": "cherry", "color": "red"}
D["apple", "banana", "cherry"]
Attempts:
3 left
💡 Hint
Common Mistakes
Using a list of strings instead of dictionaries
Not separating items with commas
Using square brackets instead of curly braces for dictionaries