THE PRACTICAL PART

Write the code.

Working examples in JavaScript, Python, SQL, spreadsheets, and more. Including the edge cases.

12 guides

Write the code01

Check whether a number is odd in JavaScript

Use a safe-integer guard and remainder to check odd numbers in JavaScript, including negatives, zero, invalid inputs, and precision limits.

3 min read
Write the code02

Check odd numbers in TypeScript with runtime validation

Build a TypeScript odd-number check that narrows unknown input, validates safe integers, and distinguishes invalid data from an even result.

3 min read
Write the code03

Check whether an integer is odd in Python

Write a Python odd-number helper with explicit integer validation, correct negative-number behavior, and a clear policy for booleans and large integers.

3 min read
Write the code04

Check odd numbers in Java, including negative values

Use a long remainder check in Java, parse text with Long.parseLong, and avoid negative-number and minimum-value mistakes.

3 min read
Write the code05

Check odd numbers in C# without losing input errors

Check a C# long for oddness, parse signed decimal text safely, and keep invalid or missing input separate from even numbers.

3 min read
Write the code06

Check whether an integer is odd in Go

Use an int64 remainder check in Go, parse decimal text with strconv, and handle architecture-dependent integers and parse errors explicitly.

3 min read
Write the code07

Check odd numbers in Rust with explicit parsing errors

Check i64 parity in Rust, propagate ParseIntError with Result, and cover negative integers, whitespace, range limits, and minimum values.

3 min read
Write the code08

Check odd integers in PHP without silent coercion

Use is_int and remainder in PHP to reject strings, fractions, and booleans before checking signed integer parity.

3 min read
Write the code09

Find odd numbers in SQL using PostgreSQL

Use PostgreSQL mod or % for integer parity, handle NULL deliberately, and distinguish odd ID values from alternating query rows.

3 min read
Write the code10

Check odd numbers in Excel without accepting fractions

Use Excel ISODD for integer cells, add a whole-number guard, and keep blanks, text, errors, and fractions distinct from even values.

2 min read
Write the code11

Check odd numbers in Google Sheets with clear validation

Build a Google Sheets parity formula that rejects fractions and text, then highlight odd integer rows without hiding invalid entries.

2 min read
Write the code12

Check odd BigInt values without losing decimal digits

Validate signed decimal strings and check JavaScript BigInt parity without converting through Number or accepting malformed text.

3 min read