Skip to content
UnderDunn Courses

Python Behavior Lab

Programming FoundationsLab 1 of 360 minutesLab included

Download python-behavior-v1.0.0.tar. Expected SHA-256:

531448744b567edabd6acd8a7a6fca9f5fd7d8f7d185295228574ec0fa49fd61
Terminal window
cd ~/Downloads
sha256sum python-behavior-v1.0.0.tar
mkdir -p ~/underdunn-labs/python-behavior
tar -xf python-behavior-v1.0.0.tar -C ~/underdunn-labs/python-behavior
cd ~/underdunn-labs/python-behavior/python-behavior-v1.0.0

Work only in this directory. Read behavior.py and values.txt. Create an evidence table for input lines, conversion, ignored lines, comparison, selected values, and output. Predict before running:

Terminal window
python3 behavior.py values.txt

Add an invalid line to a copy of the input and explain the traceback. Do not modify the original evidence file.

Construct UNDERDUNN{threshold_NUMBER_count_NUMBER} using the comparison threshold and selected count. Expected flag hash:

6231cd8f7bc34fb6ebc55b5bc9eb806983edf4ecf2e416a117463d833ca69038
Terminal window
printf '%s' 'UNDERDUNN{your_candidate}' | sha256sum

Reset by deleting only the extracted version directory and extracting the verified archive again.