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]
2 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:
vekshin12 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 is a monthly cost associated with renting a house?
Evgesh-ka [11]
The answer is a. utility bills
8 0
3 years ago
Read 2 more answers
Kitchen Gadgets
Scilla [17]

Answer:

hehe

Explanation:

7 0
2 years ago
What is operating system​
iren [92.7K]

Answer:

It's simply a software that runs a computer's basic tasks, or functions, such as scheduling, running applications, and controlling peripherals.

3 0
2 years ago
Read 2 more answers
If she presses the left arrow , what will happened
Harman [31]
The keyboard will move
4 0
3 years ago
Your computer uses 4 bits to represent decimal numbers (0, 1, 2, 3 and so on) in binary. What is the SMALLEST number
lord [1]

Answer:

C

Explanation:

I believe this is because you cannot represent the number sixteen with only four binary bits. The highest you can go is 15.

8 0
3 years ago
Other questions:
  • The Apple II is an IBM-compatible PC "clone".<br> True?<br> False?
    10·1 answer
  • Write a while statement that prints all even numbers between 1 and 100 to the screen.
    6·1 answer
  • Can y’all help me with these questions ?
    5·1 answer
  • The main devices in a rectifier are:
    14·2 answers
  • The variable most_recent_novel is associated with a dictionary that maps the names of novelists to their most recently published
    12·1 answer
  • Assign the size of userInput to stringSize. Ex: if userInput is "Hello", output is: Size of userInput: 5
    7·1 answer
  • The linear programming ingredient or blending problem model allows one to include not only the cost of the resource, but also th
    14·1 answer
  • Alison is having a hard time at work because her Inbox is flooded with emails every day. Some of these emails are unsolicited. S
    15·2 answers
  • A company has a website that has seen a large increase in visitors and they are concerned that if the trend continues, the web s
    13·1 answer
  • In the following code: function drawCircle(radius, x, y, color) { var circle = new Circle(radius); circle.setPosition(x, y); cir
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!