Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to define a Layer 2 solution type.
Blockchain / Solidity
layer2_type = "[1]"
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing Layer 1 chains with Layer 2 solutions.
✗ Incorrect
Plasma is a Layer 2 scaling solution for blockchains.
2fill in blank
mediumComplete the code to specify the main benefit of Layer 2 solutions.
Blockchain / Solidity
benefit = "[1]"
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing increased storage or more nodes as benefits.
✗ Incorrect
Layer 2 solutions reduce transaction fees by processing off-chain.
3fill in blank
hardFix the error in the code to correctly check if a solution is a Rollup.
Blockchain / Solidity
if solution == "[1]": print("This is a Layer 2 Rollup solution.")
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect solution names like Miner or Node.
✗ Incorrect
Rollup is a Layer 2 solution that bundles transactions off-chain.
4fill in blank
hardFill both blanks to create a dictionary of Layer 2 solutions and their types.
Blockchain / Solidity
layer2_solutions = {"Plasma": "[1]", "Optimistic": "[2]"} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up Sidechain and Rollup types.
✗ Incorrect
Plasma is a Sidechain type, Optimistic is a Rollup type Layer 2 solution.
5fill in blank
hardFill all three blanks to create a comprehension filtering Layer 2 solutions by type.
Blockchain / Solidity
filtered = {name: type for name, type in solutions.items() if type == "[1]" or type == "[2]" or type == "[3]"} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Including Miner as a Layer 2 solution type.
✗ Incorrect
This comprehension filters solutions that are Sidechain, Rollup, or State Channel types.