A story for the lunh exercise

This exercise involves using the Luhn formula to verify the validity of credit card numbers. The current instructions begin with:

Description

Given a number determine whether or not it is valid per the Luhn formula.

The [Luhn algorithm][luhn] is a simple checksum formula used to validate a variety of identification numbers, such as credit card numbers and Canadian Social Insurance Numbers.

The task is to check if a given string is valid.

<Rest of instructions>


Proposed story:

Introduction

At the Global Verification Authority, you’ve just been entrusted with a critical assignment. Across the city, from online purchases to secure logins, countless operations rely on the accuracy of numerical identifiers like credit card numbers, bank account numbers, transaction codes, and tracking IDs. The Luhn algorithm is a simple checksum formula used to ensure these numbers are valid and error-free.

A batch of identifiers has just arrived on your desk. All of them must pass the Luhn test to ensure they’re legitimate. If any fail, they’ll be flagged as invalid, preventing errors or fraud, such as incorrect transactions or unauthorized access.

Can you ensure this is done right? The integrity of many services depends on you.


Proposed update to instructions:

Instructions

Determine whether a credit card number is valid according to the [Luhn formula][luhn].

The number will be provided as a string.

<Rest of instructions>

1 Like

Edit: PR has been merged

This has been merged.

Any way to mark this as solved, so people do not have to “click through” to know?

I edited my post to indicate that it has been merged. Will marking it as solved effectively convey this?

1 Like