Identify prime words - MATLAB Cody - MATLAB Central

Problem 50948. Identify prime words

Difficulty:Rate
In a Numberphile video on evil primes, Tony Padilla introduced the “Jesus prime” 105,192,119, which is formed by concatenating the positions of the letters of ‘Jesus’ in the English alphabet: 10, 5, 19, 21, 19. In general, a prime word could be defined as a word such that the number formed by concatenating the positions of the letters in the alphabet is prime.
Write a function that takes a string and identifies prime words. It should delete apostrophes and hyphens (e.g. “don’t” = “dont”, “un-ionized” = “unionized”) and treat other punctuation as spaces. The function should return an array of 0’s and 1’s.

Solution Stats

57.58% Correct | 42.42% Incorrect
Last Solution submitted on Sep 13, 2024

Problem Comments

Solution Comments

Show comments
PIVlab surpasses 100K all-time File Exchange downloads
During the past twelve months, PIVlab, a MATLAB Community Toolbox for particle...
4
8
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Problem Recent Solvers16

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!