Results for “ERROR_NUMBER”
Small, practical examples. Search by task or narrow things down below.
Count five LED flashes with a for loop
Arduino / C: Repeat an LED action a known number of times and print the current count.
Arduino / C✓ Tested
Count matching values
Count even numbers in a fixed C array.
C✓ Tested
Create a file without overwriting an existing one
Python: Use exclusive creation mode and handle FileExistsError explicitly.
Python✓ Tested
Delete a known temporary file if present
Java: deleteIfExists returns whether a file was removed and still reports other I/O errors.
Java✓ Tested
Filter items in a pipeline
Keep numbers that meet a condition.
Where-Object✓ Tested
Find the largest value
Check for an empty C++ vector before dereferencing max_element.
C++✓ Tested
Format a decimal value
Print two fractional digits with C printf.
C✓ Tested
Format a zero-padded numeric label
Linux Commands: Use printf formatting instead of concatenating a variable number of zeroes.
Linux Commands✓ Tested
Format decimal output
Use fixed and setprecision to print two C++ decimal places.
C++✓ Tested
Give an LED pin a constant name
Arduino / C: Use const to name the built-in LED pin and reuse it in output instructions.
Arduino / C✓ Tested
Include every row tied for the highest score
SQL: Compare with MAX rather than limiting to an arbitrary number of rows.
SQL✓ Tested
Include every row tied for the highest score
SQL Server: Compare with MAX rather than limiting to an arbitrary number of rows.
SQL Server✓ Tested