23.8k views
3 votes
On line two, you take a string, word, as input. Then, using that string...

1. In the first line of your output, print the third character of this string.
2. In the second line, print the second to last character of this string.
3. In the third line, print the first five characters of this string.
4. In the fourth line, print all but the last two characters of this string.
5. In the fifth line, print all the characters of this string with even indices
(remember indexing starts at 0, so the characters are displayed starting
with the first)
6. In the sixth line, print all the characters of this string with odd indices
(1.e. starting with the second character in the string).
7. In the seventh line, print all the characters of the string in reverse order.
8. In the eighth line, print every second character of the string in reverse
order starting from the last one.
9. In the ninth line, print the length of the given string,

User Tory
by
5.2k points

1 Answer

3 votes

Answer:

7

Step-by-step explanation:

This one obtains results that the others in particular do not have, whether it is even one more word or another initial sentence

User Rietty
by
5.3k points