There are positive number which has no prime factor larger than 5 So the first few numbers are 1, 2, 3, 4, 5, 6, 8, 9, 10 Write a function which takes a positive number as input and returns true if it has no prime factor larger than 5 The return type should be a boolean. isPrimeFactorLargerThanFive(10) Should return true isPrimeFactorLargerThanFive(13) should return false The answer should be valid for any given input.
Member_15940361
Posts
-
JavaScript -
JavaScriptSami's spaceship crashed on Mars! She sends a series of SOS messages to Earth for help.
Letters in some of the SOS messages are altered by cosmic radiation during transmission. Given the signal received by Earth as a string, s, determine how many letters of Sami's SOS have been changed by radiation.
For example, Earth receives SOSTOT. Sami's original message was SOSSOS. Two of the message characters were changed in transit.
Function Description:
Complete the marsExploration function in the editor below. It should return an integer representing the number of letters changed during transmission.
marsExploration has the following parameter(s):
s: the string as received on Earth
Return type should be a number.
marsExploration("SOSSOT") should return 1
marsExploration("SSOSSPSSQSSOR") should return 9
The answer should be valid for any given input.