Write a program that repeats a string n
times.
string = "hello"
times = 5
output = "hellohellohellohellohello"
Write a program that prompts the user for a stirng. Print the stirng in reverse order
Enter string:
> of that im sure
Reverse is string: erus mi taht fo
Write a program that prompts the user for a string and checks (and prints) if it is a palindrome. That is "a word, phrase, or sequence that reads the same backward as forward".
Example: madam
or nurses run
. Note that, as in the second example, spaces (and capitalization) should be ignored.
Enter string:
> madam
madam is a palindrome
Write a program which reads a string and prints the word frequency for each word.
Input
> sally sells seashells by the seashore
she sells seashells on the seashell shore
the seashells she sells are seashore shells
Word Frequencies:
sally 1
sells 3
seashells 3
by 1
the 3
seashore 2
she 2
on 1
seashell 1
shore 1
are 1
shells 1