Answer:
The program in Python is as follows:
word = input("Word: ")
if len(word) < 5:
print("At least 5 characters")
else:
pal = word[0:5]
word = word[0:4]
word = word[::-1]
pal+=word
print(pal)
Explanation:
This gets the word from the user
word = input("Word: ")
This checks if the length of the word is less than 5.
if len(word) < 5:
If yes, this tells the user that at least 5 characters is needed
print("At least 5 characters")
If otherwise
else:
This extracts the first 5 characters of the word into variable named pal
pal = word[0:5]
This extracts the first 5 characters of the word into variable named word
word = word[0:4]
This reverses variable word
word = word[::-1]
This concatenates pal and word
pal+=word
This prints the generated palindrome
print(pal)
Answer: Find out which starter makes your partner most interested in reading your story.
1. Start with action or dialogue.
2. Ask a question or set of questions.
3. Describe the setting so readers can imagine it.
4. Give background information that will interest readers.
5. Introduce yourself to readers in a surprising way.
Explanation:
Answer: The difference between the scope and linkage is as follows:-
- Scope of the variable is defined as the variable view from different program parts whereas the linkage is described as the link that is made between the variable and the declaration function having the common name.
- Scope of variable describes about the existing time of the variable in the program whereas linkage is defined for the name of variable present in the program is available at all time .