Computer Science, asked by mhdsajid, 5 months ago

1 Declare an array of string type variable called word
2
3 Declare a loopcounter
4
5 Store a string in the array word
6
7 for loopcounter = (length of the word ) - 1 to 0
8 loopcounter = loopcounter - 1
9 print arrayword [ loopcounter]
10
11 endfor
12
13 Algorithm end



the above is the condition of the question
The question is:
for the following choose the best option
1 prints nothing
2 prints string as it is
3 prints the length if string
4 prints string in reverse​

Answers

Answered by yashodasurabhi
1

Answer:

which lesson questions is this better to search in Google

Answered by ZareenaTabassum
0

The answer to the question is:

Option 4 - prints string in reverse.

  • The pseudo-code prints the entered string in reverse order. For reverse printing the string, we utilized a reverse loop.

  • The Python string library does not have an in-built "reverse()" function like other Python containers like lists.
  • We use a function to reverse a string, which iterates through each element and smartly joins each character at the start to produce the reversed string.

SPJ2

Similar questions