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
Lostsunrise [7]
2 years ago
5

I need to reverse a inputted word using for loops with range 0 to the input word and increment 1.

Computers and Technology
1 answer:
Ksivusya [100]2 years ago
4 0

fruit_name = input("What is your favorite fruit: ")

fruit_len = len(fruit_name)

fruit_len = int(fruit_len)

reversed_word = ""

lower = 0

upper = fruit_len

inc = 1

for lp in range(lower, upper, inc):

   reversed_word = (fruit_name[lp] + reversed_word)

   reversed_word = str(reversed_word)

print(fruit_name + " backwards is " + reversed_word)

I just changed the str(lp) to fruit_name[lp]. This takes lp as the index of fruit_name and gets the letter at that index. We then add that letter to the existing reversed_word. I think this is what you're looking for.

You might be interested in
For what purposes do students collect data? Check all that apply.
Bumek [7]

Answer:

sounds like all of the above

Explanation:

only one im not 100% sure on is to examine a question's reliablity

5 0
3 years ago
Read 2 more answers
If you have cable internet service, what protocol is used between the head end connection and the cable company's network
julsineya [31]
The answer would be (DOCSIS). :)

Have a blessed day and hope this helps!
7 0
3 years ago
A search engine displays a list of webpage names that contain the search text. what is the term for that list?
Minchanka [31]
<span>A search engine displays a list of webpage names that contain the search text. The term for that list is hit.
Basically, what this term refers to is the number of visits, or a number of downloads that happened on that particular webpage. It is a good tool to measure web traffic, or how much that page is visited.
</span>
6 0
3 years ago
Demote the "Arrive and leave at the same time each day." List item, and then promote the "Respect" list item.
garri49 [273]

Answer:

Dear

<h3>You should wear something professional. A tie, suit, classy dress, heels. You are more likely to be hired if you make it look like you take pride in your appearance. Also, depending on what kind of job you are applying for, the outfits can vary as well.</h3>

Explanation:

Black is too formal for interviews, and earth tones are too casual. Two-button suits are the professional standard.

7 0
3 years ago
A band wants to know what their most popular CD is so that they can have more copies made to sell. Which statistical measurement
Bad White [126]

This would be Ordinal measurement.

8 0
3 years ago
Read 2 more answers
Other questions:
  • Which type of malware can hijack internal windows components and often goes undetected because it is already loaded when the ant
    14·1 answer
  • In "When Is a Planet Not a Planet?" why does the author say that the outer planets are made of gas when the inner planets are ma
    5·1 answer
  • Does anyone know the answer for this? I’m extremely confused.
    8·2 answers
  • Which of the following code is correct? I: print("Programming is fun") print("Python") print("Computer Science") II: print("Prog
    11·1 answer
  • For this scenario related to turtle drawing, indicate whether it is better to write a loop or a function (or a set of functions)
    13·1 answer
  • A proper divisor of a positive integer $n$ is a positive integer $d &lt; n$ such that $d$ divides $n$ evenly, or alternatively i
    8·1 answer
  • Advanced Electronics has employees who use a company website to share work. By posting on the website, employees are
    7·1 answer
  • HELP !!! Prompt <br> What is formatting text?
    7·2 answers
  • What are some other ways to program a robot to navigate a complicated environment other than straight paths and right angle (90
    15·1 answer
  • Which of the following is a productivity strategy for collaboration?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!