Skip to content

Commit

Permalink
Updating docs to sync with Problem-Specification (#1038)
Browse files Browse the repository at this point in the history
  • Loading branch information
jagdish-15 authored Jan 10, 2025
1 parent 7c737af commit 4b1a93a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
8 changes: 3 additions & 5 deletions exercises/practice/luhn/.docs/instructions.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# Instructions

Given a number determine whether or not it is valid per the Luhn formula.
Determine whether a credit card number is valid according to the [Luhn formula][luhn].

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 number will be provided as a string.

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

## Validating a Number
## Validating a number

Strings of length 1 or less are not valid.
Spaces are allowed in the input, but they should be stripped before checking.
Expand Down
11 changes: 11 additions & 0 deletions exercises/practice/luhn/.docs/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 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.
2 changes: 1 addition & 1 deletion exercises/practice/pascals-triangle/.docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Over the next hour, your teacher reveals some amazing things hidden in this tria
- It contains the Fibonacci sequence.
- If you color odd and even numbers differently, you get a beautiful pattern called the [Sierpiński triangle][wikipedia-sierpinski-triangle].

The teacher implores you and your classmates to lookup other uses, and assures you that there are lots more!
The teacher implores you and your classmates to look up other uses, and assures you that there are lots more!
At that moment, the school bell rings.
You realize that for the past hour, you were completely absorbed in learning about Pascal's triangle.
You quickly grab your laptop from your bag and go outside, ready to enjoy both the sunshine _and_ the wonders of Pascal's triangle.
Expand Down

0 comments on commit 4b1a93a

Please sign in to comment.