Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Script String 1 a. b. c. d Write a function named isPerfectPangram that accepts a string and returns true if the string is a

Java Script

String

1 a.

image text in transcribed

b.

image text in transcribed

c.image text in transcribed

dimage text in transcribed

Write a function named isPerfectPangram that accepts a string and returns true if the string is a perfect pangram. As covered in the previous problem, isPangram, a pangram is any phrase that contains at least one of each of the 26 letters in the English alphabet (ignoring letter-casing) A pangram is considered "perfect" if and only if it contains a single occurrence of each letter in the alphabet (non-alphabetic characters are ignored). For example, a call to isPangram("Mr. Jock, TV quiz PhD, bags few 1ynx.") should return true since it contains exactly one occurance of each 26 letters in the alphabet. However, a call of isPangram("The quick brown fox jumps over a lazy dog.") should return false since some letters occur more than once (e-g.. "a" and "o"). Write a function named isPangram that accepts a string and returns true if the string is a pangram. A pangram is any phrase that contains at least one of each of the 26 letters in the English alphabet (ignoring letter-casing). For example, a call to isPangram "The quick brown fox jumps over a lazy dog." should return true since it includes all 26 letters of the English alphabet (duplicate letters can be ignored) Write a function named repeat that accepts a string and a number of repetitions as parameters and returns the String concatenated that many times. For example, the call of repeat ("echo...".3) 3) f the number of repetitions is 0 or less, retu returns "echo...echo.echo...". I rn an empty string. Write a function named anagrams that accepts two string paramters and returns true if the second string is an anagram of the first. A string is an anagram of another string if both strings contain the same characters (ignoring case and non-alphabetic characters). For example, the call of anagrams("A decimal point", "I'm a dot in place!") should return true since both strings contain the same letters. However, the call anagrams ("Decimal point", "I'm a dot in place!") should return false because even though both strings contain the same letters, the second string has one more "a" than the first string

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle9i Database Administrator Implementation And Administration

Authors: Carol McCullough-Dieter

1st Edition

0619159006, 978-0619159009

More Books

Students also viewed these Databases questions

Question

recognise typical interviewer errors and explain how to avoid them

Answered: 1 week ago

Question

identify and evaluate a range of recruitment and selection methods

Answered: 1 week ago

Question

understand the role of competencies and a competency framework

Answered: 1 week ago