Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to configure the source before building.
Linux CLI
./configure [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using --make or --install with configure causes errors because these are not configure options.
Omitting --prefix may install software in default locations, which might require root permissions.
✗ Incorrect
The --prefix option sets the installation directory before building.
2fill in blank
mediumComplete the command to compile the source code using make.
Linux CLI
make [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'install' with make compiles and installs, but here we want to speed up compilation only.
Using 'configure' with make is invalid; configure is a separate script.
✗ Incorrect
The -j4 option tells make to use 4 parallel jobs to speed up compilation.
3fill in blank
hardFix the error in the command to clean build files.
Linux CLI
make [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'remove', 'delete', or 'clear' are not standard make targets and cause errors.
✗ Incorrect
The correct make target to remove build files is 'clean'.
4fill in blank
hardFill both blanks to create a dictionary comprehension that maps words to their lengths only if length is greater than 3.
Linux CLI
{word: [1] for word in words if [2] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using word.startswith('a') filters words starting with 'a', not length.
Using word.upper() as value does not give length.
✗ Incorrect
We map each word to its length using len(word), and filter words with length greater than 3.
5fill in blank
hardFill all three blanks to create a dictionary comprehension that maps uppercase keys to values only if value is positive.
Linux CLI
{ [1]: [2] for k, v in data.items() if [3] } Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using k.lower() changes keys to lowercase, not uppercase.
Filtering with v < 0 would keep negative values, not positive.
✗ Incorrect
We use k.upper() as keys, v as values, and filter where v > 0 to keep positive values.