Skip to content

The challenge is to program a solution that checks palindrome words. A word is palindrome if it can be read both from right to left and from left to right.

Notifications You must be signed in to change notification settings

Dino-996/palindrome_checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

EN - Build a Palindrome Checker (freeCodeCamp Certifications)

A palindrome is a word or phrase that can be read the same way forwards and backwards, ignoring punctuation, case, and spacing.

Note: You'll need to remove all non-alphanumeric characters (punctuation, spaces, and symbols) and turn everything into the same case (lower or upper case) in order to check for palindromes.

Objective: Build an app that is functionally similar to Palindrome Checker

User Stories:

  • You should have an element with an id of text-input
  • You should have a button element with an id of check-btn
  • You should have a div element with an id of result
  • When you click on the button without entering a value into the input, an alert should appear with the text "Please input a value"
  • When the input only contains the letter "A" and the button is clicked, the result should contain the text "A is a palindrome"
  • When the input contains the text "eye" and the button is clicked, the result should contain the text "eye is a palindrome"
  • When the input contains the text "_eye" and the button is clicked, the result should contain the text "_eye is a palindrome"
  • When the input contains the text "race car" and the button is clicked, the result should contain the text "race car is a palindrome"
  • When the input contains the text "not a palindrome" and the button is clicked, the result should contain the text "not a palindrome is not a palindrome"
  • When the input contains the text "A man, a plan, a canal. Panama" and the button is clicked, the result should contain the text "A man, a plan, a canal. Panama is a palindrome"
  • When the input contains the text "never odd or even" and the button is clicked, the result should contain the text "never odd or even is a palindrome"
  • When the input contains the text "nope" and the button is clicked, the result should contain the text "nope is not a palindrome"
  • When the input contains the text "almostomla" and the button is clicked, the result should contain the text "almostomla is not a palindrome"
  • When the input contains the text "My age is 0, 0 si ega ym." and the button is clicked, the result should contain the text "My age is 0, 0 si ega ym. is a palindrome"
  • When the input contains the text "1 eye for of 1 eye." and the button is clicked, the result should contain the text "1 eye for of 1 eye. is not a palindrome"
  • When the input contains the text "0_0 (: /-\ :) 0-0" and the button is clicked, the result should contain the text "0_0 (: /-\ :) 0-0 is a palindrome"
  • When the input contains the text "five|/|four" and the button is clicked, the result should contain the text "five|/|four is not a palindrome"

Fulfill the user stories and pass all the tests below to complete this project. Give it your own personal style. Happy Coding!


IT - Costruisci un Verificatore di Palindrome (Certificato freeCodeCamp)

Una parola o frase palindroma è una sequenza di caratteri che può essere letta allo stesso modo sia da sinistra a destra che da destra a sinistra, ignorando punteggiatura, maiuscole e spaziatura.

Nota: Dovrai rimuovere tutti i caratteri non alfanumerici (punteggiatura, spazi e simboli) e convertire tutto nella stessa forma (maiuscolo o minuscolo) per verificare le parole palindrome.

Obiettivo: Costruisci un'app che sia funzionalmente simile a Palindrome Checker.

Storie Utente:

  • Dovresti avere un elemento con un id di text-input
  • Dovresti avere un elemento di pulsante con un id di check-btn
  • Dovresti avere un elemento div con un id di result
  • Quando clicchi sul pulsante senza inserire un valore nell'input, dovrebbe apparire un avviso con il testo "Inserisci un valore"
  • Quando l'input contiene solo la lettera "A" e viene cliccato il pulsante, il risultato dovrebbe contenere il testo "A è una parola palindroma"
  • Quando l'input contiene il testo "eye" e viene cliccato il pulsante, il risultato dovrebbe contenere il testo "eye è una parola palindroma"
  • Quando l'input contiene il testo "_eye" e viene cliccato il pulsante, il risultato dovrebbe contenere il testo "_eye è una parola palindroma"
  • Quando l'input contiene il testo "race car" e viene cliccato il pulsante, il risultato dovrebbe contenere il testo "race car è una parola palindroma"
  • Quando l'input contiene il testo "not a palindrome" e viene cliccato il pulsante, il risultato dovrebbe contenere il testo "not a palindrome non è una parola palindroma"
  • Quando l'input contiene il testo "A man, a plan, a canal. Panama" e viene cliccato il pulsante, il risultato dovrebbe contenere il testo "A man, a plan, a canal. Panama è una parola palindroma"
  • Quando l'input contiene il testo "never odd or even" e viene cliccato il pulsante, il risultato dovrebbe contenere il testo "never odd or even è una parola palindroma"
  • Quando l'input contiene il testo "nope" e viene cliccato il pulsante, il risultato dovrebbe contenere il testo "nope non è una parola palindroma"
  • Quando l'input contiene il testo "almostomla" e viene cliccato il pulsante, il risultato dovrebbe contenere il testo "almostomla non è una parola palindroma"
  • Quando l'input contiene il testo "My age is 0, 0 si ega ym." e viene cliccato il pulsante, il risultato dovrebbe contenere il testo "My age is 0, 0 si ega ym. è una parola palindroma"
  • Quando l'input contiene il testo "1 eye for of 1 eye." e viene cliccato il pulsante, il risultato dovrebbe contenere il testo "1 eye for of 1 eye. non è una parola palindroma"
  • Quando l'input contiene il testo "0_0 (: /-\ :) 0-0" e viene cliccato il pulsante, il risultato dovrebbe contenere il testo "0_0 (: /-\ :) 0-0 è una parola palindroma"
  • Quando l'input contiene il testo "five|_/|four" e viene cliccato il pulsante, il risultato dovrebbe contenere il testo "five|_/|four non è una parola palindroma"

Completa le storie utente e supera tutti i test sottostanti per completare questo progetto. Dacci il tuo stile personale. Buon Coding!

About

The challenge is to program a solution that checks palindrome words. A word is palindrome if it can be read both from right to left and from left to right.

Topics

Resources

Stars

Watchers

Forks