- Question:-palindrome?
what is the longest palindrome you can come up with? I once heard a sentance that was one, but I forgot it...have at it!
Answer:-Dennis, Nell, Edna, Leon, Nedra, Anita, Rolf, Nora, Alice, Carol, Leo, Jane, Reed, Dena, Dale, Basil, Rae, Penny, Lana, Dave, Denny, Lena, Ida, Bernadette, Ben, Ray, Lila, Nina, Jo, Ira, Mara, Sara, Mario, Jan, Ina, Lily, Arne, Bette, Dan, Reba, Diane, Lynn, Ed, Eva, Dana, Lynne, Pearl, Isabel, Ada, Ned, Dee, Rena, Joel, Lora, Cecil, Aaron, Flora, Tina, Arden, Noel, and Ellen sinned.” - Question:-Palindrome??????????????
What is a single word obscene palidrome? Like a curse word or an offensive word?
HURRY ITS FOR MY SENIOR SCAVENGER HUNT NOW!!!
Answer:-boob? - Question:-How to write a palindrome program in Java?
Create a Palindrome application that prompts the user for a string then displays a message indicating whether or not the string is a palindrome. A palindrome is a word or phrase that is spelled the same backwards and forwards. For example, “mom” is a palindrome, as well as “kayak” and “Never odd or even”.
Answer:-Here ya go be sure to best answer
public class Palindrome {
private String pal;
public Palindrome(String initPal) {
pal = initPal.toUpperCase();
}
public boolean isPalindrome() {
if (pal.length() <= 1) {
// String has only one character so it
// is a Palindrome by definition.
return true;// BASE CASE.
}
// Get the first and last characters of the String.
char first = pal.charAt(0);
char last = pal.charAt(pal.length()-1);
if (Character.isLetter(first) &&
Character.isLetter(last)) {
// The first and last characters are both letters..
if (first != last) {
// The first and last letters are different
// so the string is not a Palindrome.
return false; // BASE CASE.
}
else {
// The first and last characters are both letters,
// and they are both the same. So, the string is
// a palindrome if the substring created by dropping
// the first and last characters is a palindrome.
Palindrome sub = new Palindrome(
pal.substring(1,pal.length()-1));
return sub.isPalindrome(); // RECURSIVE CASE.
}
}
else if (!Character.isLetter(first)) {
// The first character in the string is not a letter.
// So the string is a palindrome if the substring created
// by dropping the first character is a palindrome.
Palindrome sub = new Palindrome(pal.substring(1));
return sub.isPalindrome(); // RECURSIVE CASE.
}
else {
// The last character in the string is not a letter.
// So the string is a palindrome if the substring created
// by dropping the last character is a palindrome.
Palindrome sub = new Palindrome(
pal.substring(0,pal.length()-1));
return sub.isPalindrome(); // RECURSIVE CASE.
}
}
public static void main(String[] args) {
Palindrome p1 = new Palindrome("Madam, I'm Adam.");
System.out.println(p1.isPalindrome());
Palindrome p2 = new Palindrome("Nope!");
System.out.println(p2.isPalindrome());
Palindrome p3 = new Palindrome("dad");
System.out.println(p3.isPalindrome());
Palindrome p4 = new Palindrome("Go hang a salami, I'm a lasagna hog.");
System.out.println(p4.isPalindrome());
}
} - Question:-What is the first palindrome greater than 10000 and divisible by 3?
What is the first palindrome greater than 10000 and divisible by 3? Please help!
Answer:-10101.
Any number less than this (and greater than 10000) will not be a palindrome. Moreover, 10101 / 3 = 3367.
I hope that helps! - Question:-What is the longest palindrome you can think of?
I saw a person ask what a palindrome is. What is the longest palindrome? Or, longest one (most letters) that you can think of?
Answer:-The longest single English word in common usage which is a palindrome is REDIVIDER, although the contrived chemical term DETARTRATED is two letters longer. In Finnish there is a 25-letter palindromic word: SOLUTOMAATTIMITTAAMOTULOS which means the result from a measurement laboratory for tomatoes, although technically it is a compound of four words. There is also the equally long SAIPPUAKUPPINIPPUKAUPPIAS which means soap cup trader. - Question:-How can I write a java program to check a palindrome of a string?
My Lecturer asked me to write a java program to check a palindrome of a string? Could you kindly show me how to maybe be give an example.
Answer:-boolean isPalindrome(String s){
for (itn i=0; i < string.length()/2; i++)
if (s.charAt(i) != s.charAt(string.length()-i))
return false;
return true;
}
... you might want to check the end points .. but its the general idea
this is a palindrome
asdffdsa - Question:-What's the longest palindrome made without using a palindrome-generating program?
I'm trying to make the longest palindrome that doesn't make use of a generator. How long is the longest one that doesn't use a generator?
Answer:-Finnish has the longest single-word palindromes, with two entries: “saippuakivikauppias,” which means “soap stone dealer”; and “solutomaattimittaamotulos,” which means “the result from a measurement laboratory for tomatoes.” Depending on who you ask, “tattarrattat,” “kinnikinnik,” or “detartrated” is the longest single-word palindrome in English, though some would say these words are not really part of the English language, since they are contrived or almost never used. - Question:-3digit postive integers.What is the probability that any thee-digit palindrome is also a multiple of eleven?
You are given a special set of numbers that contains all three-digit positive integers that are palindromes. What is the probability that any thee-digit palindrome is also a multiple of eleven?
Answer:-Since the numbers are in a form xyx, There are nine possible digits for x (1-9) and ten for y (0-9). So off the bat, there are only 90 numbers in this set.
101x + 10y = 11z
For any given x, only one value of y at most is going to produce a multiple of 11. That's because whichever value it is, the next one up will be y+11, and y only goes from 0 to 9.
At x=1, the value of y has to be 2, for the number 121.
At x=2, y=4, for 242.
x=3, y=6: 363
x=4, y=8: 484
As you can see there's a pattern where y=2x. If you add or subtract 11 to y you can still have a multiple of 11.
At x=5, y=10, and since y=10 is not an acceptable value, there is no multiple of 11 where x=5.
At x=6, y=12. y=12 is not valid but you can subtract 11 to get it back into range. x=6, y=1: 616. And 616 = 11 × 56.
x=7, y=14 -> 3: 737
x=8, y=16 -> 5: 858
x=9, y=18 -> 7: 979
All nine values of x except for 5 had a single palindrome divisible by 11. So out of 90 palindromes, 8 were divisible by 11.
8/90 = 4/45 - Question:-How to write a class Palindrome() to identify palindromes from a set of strings?
Palindrome is a word that reads the same forward and backward. Needs to accept the strings and confirm or deny its palindrome.
Answer:-yeah, you want to read in the words (strings)
eg string a = "hannah"
string b = "doctor"
string c = "flower"
now reverse each string
string a2 = "hannah"
string b2 = "rotcod"
string c2 = "rewolf"
now create an argument that says
if a = a2,
give output as "this word is a palindrome"
else
give output as "this word is not a palindrome"
you could also include something in there which tells the program to ignore whether characters in the string are upper- or lower-case, so that it doesn't tell you that "Hannah" is different to "hannaH"
hope you can form a program from this in whatever language you're using - Question:-How do I can write a program "Palindrome"to testing if a line of text (read from the keyboard) is apalindrome?
A palindrome is a text consisting of the same sequence of characters read
backwards, as if read from the front. Ignore all characters that are not letters, and consider
an upper case letter to be equal to the corresponding lower case letter. Examples of
palindromes:
"Anna" "x" "Ff" "A1 n2%}=3N{[a]" "Was it a rat I saw?”
Sorry! In Java.
Answer:-in java.
import java.util.*;
public class Palindrome {
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
isPalindrome(sc.nextLine());
}
public static void isPalindrome(String s){
s=s.replaceAll("[^a-zA-Z]","");
s=s.toLowerCase();
char[] orgStr =s.toCharArray();
String revStr="";
for(int i=orgStr.length-1;i>=0;i--){
revStr+=orgStr[i];//System.out.println(orgStr[i]);
}
if(s.equals(revStr)){System.out.println("its a PALINDROME");}
else {System.out.println("its not a PALINDROME");}
}
}
Showing posts with label string. Show all posts
Showing posts with label string. Show all posts
Wednesday, November 2, 2011
palindrome
Labels:
"hannah",
characters,
class,
palindrome,
palindrome",
palindromes,
program,
public,
string,
write
Monday, October 24, 2011
harp
- Question:-What's the difference between lever harp and celtic harp?
I know that the lever harp has levers at the top to make the note sharp but beside from that are there any other big differences? Also, I really want to, and plan on, learning to play the harp. For a beginner, which one should I choose?
Answer:-A celtic harp is a lever harp the terms you are looking for are celtic and folk which are different names for the same thing too. Lever harps can range from lap harps about 2 ft tall with 22 strings to 5 ft tall with as man as 40 strings.These strings come in nylon, wire, and gut as a beginner I do not recommend wire strings because they are difficult to replace if they break and generally more expensive but they do give the base a great sound. For a beginner if you are not sure about playing the harp start off by renting. There are great harp stores out their that will rent you a harp till you are ready to commit because committing is a big step and can cost quite a bit. If you are ready to commit shop around have someone else play the harp you are thinking about getting to see if you like the sound as a audience member, harps sound different when you are playing them. Also I would not recommend lap harps in general. Although they are easier to carry around it is also very hard to find one that sounds good because they are too small in addition they severely limit your song selections because many harp songs require at least 3 and 1/2 octaves. Hope this helps and like I said there really is not I difference just celtic harp sounds much fancier than a folk harp. - Question:-What "size" Celtic harp is best, especially for a beginner?
I'm thinking of buying a Celtic harp. What's the minimum size (number of strings) that will still allow me to play most Celtic harp music? I don't want to buy a harp, buy music, then find out that my harp doesn't have the range I need to play the music. Been there, done that, with another instrument---don't want to go thru that frustration again!
Answer:-I agree with the above answer, bigger is definitely better. When it comes to harps, the more strings you have, the more range you have to play music. Usually the most strings you can find on a celtic harp are 36 to 38 strings. If you can afford a harp with 2 octaves below middle C you'll be set for the rest of your celtic harp playing days. Those 2 octaves below middle C will give you enough room to play different accompaniments in your left hand. Of course the larger harps get, the more expensive they tend to get so you want as many strings as you can afford. Another thing you want to consider is levers on the harp. It is great to get a harp with a full set of levers because that will allow you to grow into the harp as you progress, giving you the flexibility to play in different keys without having to constantly retune strings. The least amount of levers you want on a celtic harp is levers on the C & F strings. Atleast with levers on those strings you can easily play in the C, D, and G major keys. I worked at a harp store for 5 years and play myself so I know what kind of information you may be needing. Good luck and have fun playing the harp! - Question:-Is a Harp or Violin better for a beginner?
I'm very interested in learning to play an instrument but I'm having some trouble deciding between a Harp and a Violin. Which would be a better instrument for a novice with very little musical knowlege?
Answer:-Start with the violin.Trust me,the harp is much much harder. - Question:-How should I tune a 15 string harp?
I just bought a 15 string lap harp and I was wondering how should I tune it? I thought about tuning it every semi and whole note starting at C up to the D an octave above the first C so I can play in any key, but I end up getting a very limited range.
As well, if you can, please recommend any websites that have free sheet music, thanks.
Answer:-I don't play harp but I know some people who do.
You tune it to a C major diatonic scale -- the red strings are C's and the blue strings are F's. Better quality/more advanced models have sharping levers on the C and F strings to facilitate retuning to play in different keys (want to play in G? Flip the sharping levers on all the F strings to make them into F#'s -- no problem). Top quality harps have sharping levers on every string to make the instrument fully chromatic. If your instrument doesn't have sharping levers, then to play in different keys, you'll have to manually retune to get the necessary sharps or flats you'll need for the key you want.
Hope this helps. - Question:-How does ones harp turn to mourning and ones flute to the sound of those who weep?
Job 30:31 - "Therefore my harp is turned to mourning, And my flute to the sound of those who weep.
Answer:-I have no idea, I looked it up to see if it made anymore sense in context of the other verses, but couldn't heads or tails of it.
Sorry. - Question:-How much does one Harp string generally cost?
My friend just broke a sting on her harp and she's freaking out. She said it was the second to lowest string. How much will is cost her to replace it?
Answer:-It's not that big a deal, really - it does happen occasionally (though usually on the higher strings). It could cost a lot more than 5$ though if it's the second to lowest string, as the lower the strings go the more expensive.
How much it costs really depends on what kind of harp she has but it'll probably be £7-£12 or $7-$13. Could be less if it's a smaller harp. - Question:-Is playing the Celtic harp difficult?
I play the piano, recorder and fiddle and wanted to play the harp also. Does it take awhile to actually sound good? And would you need an instructor to teach you?
Answer:-I imagine that like all musical instruments you would need an instructor to teach you - Question:-How would I go about learning to play the harp?
I've always wanted to learn how. If I could master just one musical instrument, it would be the harp. How much would a harp cost? How about the lessons? Could I possibly teach myself? Any info would help. Thanks.
Answer:-I'm a harper; I've been teaching myself for sixteen years now. You may e-mail me if you like, and I can give you more specific information. Where do you live? What variety of harp would you like to play--pedal or lever? I can direct you better if I have an idea what you have in mind.
I play Irish harp, and so most of the music I play is Irish, Scottish or Welsh. My harp is made by a company called Dusty Strings, based in Seattle, Washington, USA; I bought it at Melody's Traditional Music in Houston, Texas. Mine has 32 strings; if you were to buy it new today, it would be about $3,900.00. Dusty Strings is the best maker of lever, or folk, harps in the US, in my opinion.
If you're interested in pedal harp, a cheap one will be about $10,000, but it is completely chromatic, and has a greater range than lever harps have.
You can teach yourself some things, but a teacher will be of immense help. You might inquire at your local music store; they're the best connection for music teachers and students to hook up. - Question:-How to get different sounds out of my harp?
When I play it it goes, what? I am looking for my harp to make the most shocking sounds ever.
Answer:-Draw on holes 2 and 5 while blocking holes 3 and 4 with your tongue!
lol..... Hopefully you have a harmonica....... - Question:-How could I know if a harp is of good quality?
Hello. I want to buy an 38 string celtic harp, but I want to know if it's a good idea to buy one online in webpages like ebay or are there brands that are better than the offbrand ones found in this sites.
How could I know if a harp is of good quality?
Thank you
Answer:-Exercise great caution!
Too many beginning harpers are suckered in by buying a cheap Pakistani-made harp. These are usually made from rosewood, and have some machine-made flowery carvings on the sides. If that's what you're seeing on E-Bay, then I strongly advise against it. They are cheaply made, and of poor quality. As I say so often, you get what you pay for; and even an experienced harper can't make a crappy instrument sound good.
I usually advise beginners that you should never buy a harp you haven't personally played for yourself--it's too chancy. That being said, there are very reputable makers in the United States that I would recommend, but they are different enough in their styles that your personal preference should still dictate which one you choose. I'd recommend anything by Dusty Strings (mine is a Dusty Strings 32-string, in walnut); Triplett and Thormahlen also make high-quality harps.
You don't mention the harp maker in your question; if you like, you are welcome to e-mail me with whatever particulars you know about this harp you're considering, and maybe I can help you arrive at a decision.
Subscribe to:
Posts (Atom)