0
0
Raspberry Piprogramming~10 mins

Operating system setup (Raspberry Pi OS) - Interactive Code Practice

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

Complete the code to check the Raspberry Pi OS version.

Raspberry Pi
cat /etc/[1]
Drag options to blanks, or click blank then click option'
Aversion.txt
Bos-release
Cconfig.txt
Dhostname
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'version.txt' which does not exist in /etc.
Using 'config.txt' which is for system configuration, not OS version.
2fill in blank
medium

Complete the command to update the package list on Raspberry Pi OS.

Raspberry Pi
sudo apt [1]
Drag options to blanks, or click blank then click option'
Aupgrade
Binstall
Cupdate
Dremove
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'upgrade' which installs updates but does not refresh the package list.
Using 'install' which installs new packages.
3fill in blank
hard

Fix the error in the command to upgrade all packages on Raspberry Pi OS.

Raspberry Pi
sudo apt [1] -y
Drag options to blanks, or click blank then click option'
Aupgrade
Binstall
Cupdate
Dautoremove
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'update' which does not upgrade packages.
Using 'install' which installs new packages.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that maps package names to their versions if the version is greater than 1.0.

Raspberry Pi
versions = {pkg: info[1] for pkg, info in packages.items() if info[2] 1.0}
Drag options to blanks, or click blank then click option'
A.version
B>
C<
D.name
Attempts:
3 left
💡 Hint
Common Mistakes
Using '.name' instead of '.version' for the first blank.
Using '<' instead of '>' for the second blank.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that maps uppercase package names to their info if the info size is greater than 100.

Raspberry Pi
filtered = [1]: [2] for [3], info in packages.items() if info.size > 100}
Drag options to blanks, or click blank then click option'
Apkg.upper()
Binfo
Cpkg
Dpackage
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'package' instead of 'pkg' in the loop variable.
Using 'pkg' instead of 'pkg.upper()' for the key.