FIND YOUR NEXT FEW LINES

Results for “standard”

Small, practical examples. Search by task or narrow things down below.

703 snippets foundClear filters
PythonGetting Started

Combine text with a name

Python: Construct a greeting from a fixed prefix and a stored name.

Python✓ Tested
C#Getting Started

Combine text with a name

C#: Construct a greeting from a fixed prefix and a stored name.

C#✓ Tested
JavaGetting Started

Combine text with a name

Java: Construct a greeting from a fixed prefix and a stored name.

Java✓ Tested
GoGetting Started

Combine two Boolean conditions

Combine two Boolean conditions using a complete Go program with explicit sample inputs.

Go✓ Tested
PythonGetting Started

Compare a value with a limit

Python: Turn a comparison into a readable yes or no result.

Python✓ Tested
C#Getting Started

Compare a value with a limit

C#: Turn a comparison into a readable yes or no result.

C#✓ Tested
JavaGetting Started

Compare a value with a limit

Java: Turn a comparison into a readable yes or no result.

Java✓ Tested
RustStrings & Unicode

Compare ASCII text ignoring case

Compare ASCII text ignoring case in a complete Rust program using the standard library.

Rust✓ Tested
PythonNumbers & calculations

Compare floating-point calculations with tolerance

Python: Use isclose instead of exact equality for results affected by floating-point rounding.

Python✓ Tested
JavaPrecise numeric calculations

Compare floating-point results with a tolerance

Java: For this bounded example, compare the absolute difference against a chosen error threshold.

Java✓ Tested
GoTesting & reusable helpers

Compare floats within a tolerance

Compare floats within a tolerance using a complete Go program with explicit sample inputs.

Go✓ Tested
GoMaps & sets

Compare map contents

Compare map contents using a complete Go program with explicit sample inputs.

Go✓ Tested