1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Mandarinka [93]
3 years ago
14

Write a function called reverse Return that is almost the same job as reverse, but instead of printing the letters straight to t

he screen, it returns a String in which the letters have been reversed. The function call would look like:
Computers and Technology
1 answer:
vekshin13 years ago
8 0

Answer:

The function in Python is as follows:

def reverse(inputstr):  

   outputstr = ""

   for i in inputstr:

       outputstr = i + outputstr

   return outputstr

Explanation:

This defines the function

def reverse(inputstr):

This initializes the output string

   outputstr = ""

This iterates through the input string

   for i in inputstr:

This generates the output string by reversing the input string

       outputstr = i + outputstr

This returns the reversed string

   return outputstr

You might be interested in
Which of the following allows you to copy
Paladinen [302]

Answer:

format painter

Explanation:

8 0
3 years ago
Which access modifier is not allowed in a struct? Private Public Protected Internal All of the Above None of the Above A block {
quester [9]

Answer:

Protected.

Explanation:

Structures and classes that are declared within the namespace directly can be internal or public by default they are internal.Struct members can be declared internal,public or private.Since structures does not support inheritance so they does not support protected access modifier.Hence we conclude that the answer is Protected.

5 0
3 years ago
________ network each device is connected directly to a central network switch.
Svetradugi [14.3K]
IN THE network, each device is connected directly to a central switch.
6 0
4 years ago
How do you think the blitz might have affected civilian morale in london
Elena-2011 [213]

Answer:

It would have seriously negatively affected civilian morale in London. Hearing about the horrors of the war even from far away does a number on morale. This, however, was not exactly the case for London in WWII, because even as air raids were executed on the city, the citizens, confined to underground bomb shelters, still managed to pull together and keep morale high, causing London NOT to plunge into chaos, but to stand united against Germany.

6 0
3 years ago
Mathematics and modern technology​
coldgirl [10]

Answer:

where is the question ???? breh

6 0
3 years ago
Other questions:
  • What is heaven backwards?
    11·2 answers
  • Adding _______ around calculations indicates which calculations should be performed first before following the typical order of
    6·2 answers
  • What is the top folder of the file tree called
    5·2 answers
  • The width of a strand of fiber is 19.2 micrometers. if 1500 strands are adhered side by side, how wide would the resulting fabri
    9·1 answer
  • What is the process of designing green buildings called
    9·2 answers
  • Helpppp plsssss!!!<br><br>thanks.
    7·1 answer
  • Consider the following code segment. The code is intended to read nonnegative numbers and compute their product until a negative
    11·1 answer
  • 9. Differentiate between bolding and highlighting<br>text.<br>(2 marks)​
    15·2 answers
  • 1. Who was able to complete the puzzle the fastest in Trial 1?
    15·1 answer
  • What dod instruction implements the dod cui program
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!