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]
3 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]3 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
An opening inside the system unit in which you can install additional equipment can be known as
Ray Of Light [21]

Answer:

<u><em>A bay</em></u> is an open area inside the system unit in which you can install additional equipment.

8 0
2 years ago
Janet received an email from a bank asking for the password for her Internet banking account. She emailed back her password. A f
Tcecarenko [31]
Probably a phishing scam

asks for personal information claiming to be a person from a legitimate bank
6 0
3 years ago
Read 2 more answers
In python:
egoroff_w [7]

Python can be used to implement central of tendencies such as mean, median and mode using the statistic module

The program in Python, where comments are used to explain each line is as follows:

#This imports the statistics module

import statistics

#This defines the function that calculates the mode

def calcMode(myList):

   #This prints the mode

   print(statistics.multimode(myList))

#This defines the function that calculates the median

def calcMedian(myList):

   #This prints the median

   print(statistics.median(myList))

#The main method begins here

#This initializes the list

myList = []

#The following iteration gets input for the list

for i in range(10):

   myList.append(int(input()))

#This calls the calcMode method

calcMode(myList)

#This calls the calcMedian method

calcMedian(myList)

Read more about similar programs at:

brainly.com/question/25026386

8 0
3 years ago
When installing the latest version of Internet Explorer, a dialogue box pops up with a box checked telling you that Bing will be
meriva

Answer:

B) opt-out identify

Explanation:

To opt-out means refusing to or avoiding to accept unsolicited refers to  products or service information. In this caseyou are refusing to accept Bing as your default search provider

8 0
3 years ago
Which file extension indicates a Microsoft Excel document?
VikaD [51]
XLSX is the extension for an excel document.

3 0
3 years ago
Other questions:
  • If the current through a heater coil is 5 amp and the supply voltage is 120 volts, the coil resistance is A. 0.04 ohm. B. 24 ohm
    6·1 answer
  • A musical compact disc is an example of
    13·1 answer
  • The picture that graphically represents the items you use in Windows is called a/an
    12·2 answers
  • How to get 60 fps pubg​
    9·2 answers
  • We never need to use a forward declaration when invoking a public subprogram. true or false?
    15·1 answer
  • I need the code for Assignment 5 Animation in Edhesive, its in python code.
    9·1 answer
  • A network monitor records the following information while recording a network connection.
    9·1 answer
  • The loss of privacy data has implications:
    5·1 answer
  • Signing up for a(n) ____ will automatically provide you with web content that is updated on a regular basis.
    15·1 answer
  • What is the output of the following program when the method is called with 4?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!