0
0
Blockchain / Solidityprogramming~10 mins

Why scaling solves blockchain limitations - Test Your Understanding

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

Complete the code to define the maximum number of transactions per block.

Blockchain / Solidity
MAX_TRANSACTIONS = [1]
Drag options to blanks, or click blank then click option'
A10000
B1000
C100
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing too low a number limits throughput.
Choosing too high a number may cause block size issues.
2fill in blank
medium

Complete the code to increase the block size limit for scaling.

Blockchain / Solidity
block_size_limit = [1]  # in megabytes
Drag options to blanks, or click blank then click option'
A8
B20
C0.5
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Setting block size too small limits transactions.
Too large block size can cause network delays.
3fill in blank
hard

Fix the error in the code that calculates transactions per second (TPS).

Blockchain / Solidity
tps = total_transactions / [1]  # seconds per block
Drag options to blanks, or click blank then click option'
Ablock_time
Bblock_size
Ctransaction_fee
Dblock_height
Attempts:
3 left
💡 Hint
Common Mistakes
Using block size instead of block time.
Using unrelated variables like transaction fee.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that maps block numbers to their sizes if size is less than 8 MB.

Blockchain / Solidity
block_sizes = {block_num: size for block_num, size in blocks.items() if size [1] [2]
Drag options to blanks, or click blank then click option'
A<
B8
C>
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Using greater than instead of less than.
Using wrong size value.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that maps block IDs (uppercase) to their transaction counts if count is greater than 1000.

Blockchain / Solidity
filtered_blocks = { [1]: [2] for block_id, count in blocks.items() if count [3] 1000}
Drag options to blanks, or click blank then click option'
Ablock_id.upper()
Bcount
C>
Dblock_id.lower()
Attempts:
3 left
💡 Hint
Common Mistakes
Using lower() instead of upper().
Using less than operator instead of greater than.