Results for “standard”
Small, practical examples. Search by task or narrow things down below.
Round a decimal with an explicit rule
Java: Construct BigDecimal from text to avoid importing a binary floating-point approximation.
Java✓ Tested
Round and format a decimal value
Round and format a decimal value in a complete Rust program using the standard library.
Rust✓ Tested
Round decimal amounts explicitly
Python: Build Decimal values from strings and choose a rounding rule explicitly.
Python✓ Tested
Round down to a whole minute
Round down to a whole minute using a complete Go program with explicit sample inputs.
Go✓ Tested
Run a task on an executor and close it
Java: Java 21 ExecutorService supports try-with-resources to shut down after submitted work.
Java✓ Tested
Run cleanup after a handled exception
Java: A finally block executes whether the protected operation succeeds or fails.
Java✓ Tested
Run cleanup around a custom context
Python: Use try/finally inside a contextmanager so cleanup runs even on failure.
Python✓ Tested
Run cleanup when a function returns
Run cleanup when a function returns using a complete Go program with explicit sample inputs.
Go✓ Tested
Run your first Go program
Run your first Go program using a complete Go program with explicit sample inputs.
Go✓ Tested
Run your first program
Python: Start with a complete program that prints one line. Follow the run instructions below.
Python✓ Tested
Run your first program
C#: Start with a complete program that prints one line. Follow the run instructions below.
C#✓ Tested
Run your first program
Java: Start with a complete program that prints one line. Follow the run instructions below.
Java✓ Tested