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
She wants to sort the list based on the names of the first four gas in ascending order. Which command group dose she navigate to
zubka84 [21]

<u>Best method to sort data:</u>

Best method to sort for data people use excel sheet.  If we have 4 quarter sales data of each select man wise.

1. Open the MS Excel

2. Create blank sheet

3. Create list of salesman and quarter sales in each cells from A1….

4. Select all whole worksheet and paste it the data

5. Once data is copied, custom list is created and select advanced options dialog box, select required field and sorting is achieved.

This is simple’s method for sort the list based on the names of the first four gas in ascending order.

7 0
3 years ago
Read 2 more answers
PA theme is a major message that a writer convoys through a text. you have explored many themes in the hobbit one theme in the n
Nataly [62]

Answer:

The Hobbit’s main theme is Bilbo’s development into a hero, which more broadly represents the development of a common person into a hero. At the beginning of the story, Bilbo is timid, comfortable, and complacent in his secure little hole at Bag End. When Gandalf talks him into embarking on the quest with Thorin’s dwarves, Bilbo becomes so frightened that he faints. But as the novel progresses, Bilbo prevails in the face of danger and adversity, justifying Gandalf’s early claim that there is more to the little hobbit than meets the eye.??????

Explanation:

7 0
2 years ago
Match the different sources of payments to their descriptions. an electronic device that aids consumers to make online payments
LekaFEV [45]

<u>Automatic Draft-</u> A convenient payment method where funds are automatically debited from your account.

<u>Cash-</u> The physical form of currency.

<u>Credit Card-</u> Allows you to make a purchase and pay for it later.

<u>Digital Wallet-</u> An electronic device that aids consumers to make online payments through various websites.

For anyone still looking, hope this helps.

6 0
3 years ago
Social media challenges third world country are facing​
dexar [7]

Answer:

I guess this is your answer

development organizations working in developing countries.

Explanation:

If it is wrong srry in advance i just dont know the options

3 0
3 years ago
1. Describe how research and development influence design. Cite specific examples of how research and development influence desi
vladimir1956 [14]

Answer:

so i research and found this,

Development is when findings of a research are utilized for the production of specific products including materials, systems and methods. Design and development of prototypes and processes are also part of this area. Engineering is utilization of these plans and research to produce commercial products.

4 0
3 years ago
Other questions:
  • Who is good with Introduction to photography? I don’t know nothing about cameras if you do please contact me ASAP
    13·1 answer
  • What is the best way to improve an online search
    6·2 answers
  • What is output? <br> Print (12 % 5)<br><br> Answer <br> 0<br> 5<br> 2<br> 1
    12·2 answers
  • . If you have written the following source code:
    9·1 answer
  • Write a program to randomly fill an array of float of 10 elements (use the rand() function and make sure to use #include ) in ma
    11·1 answer
  • How do i do a mutioutput on a mac
    9·1 answer
  • Writing a function that implements a loop to collect a set amount of data. The function should use the serial object, the record
    9·1 answer
  • Zara wants to create some lines of code that are ignored by the computer. What should these lines begin with?
    5·1 answer
  • Please help me with this coding problem :)
    6·1 answer
  • When copper wires are bundled together, they are susceptible to ____________, a form of interference where the signals leak out
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!