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
JPG is considered a lossy file format. What does this mean?
Elis [28]

Answer:

either a or b

Explanation:

5 0
2 years ago
Read 2 more answers
A software development company wants to reorganize its office so that managers and the Computer Programmers they supervise can b
dimaraw [331]
Perhaps instead of cubicles, desks are organized in an open workspace which promotes collaboration (and makes it easier).
7 0
2 years ago
Read 2 more answers
1What kind of rules protect everyone’s rights when we use each other’s content
Tanya [424]

Answer:

1. Copyright.

2. Songs and books.

Explanation:

A copyright law can be defined as a set of formal rules granted by a government to protect an intellectual property by giving the owner an exclusive right to use while preventing any unauthorized access, use or duplication by others.

For example, when an individual downloads a song owned by any record company without paying a purchase fee, it is a violation of copyright law.

A copyright can be defined as an exclusive legal right granted to the owner of a creative work (intellectual property) to perform, print, record, and publish his or her work. Also, the owner is granted the sole right to authorize any other person to use the creative work.

Hence, copyright is a kind of rules that protect everyone’s rights when we use each other’s content.

An intellectual property can be defined as an intangible creation of the human mind, ideas, thoughts or intelligence. Some examples of an intellectual property are songs, books, poems, technology, design etc.

3 0
3 years ago
Which section of a personal narrative requires the most development
attashe74 [19]
D. Plot because a,b,and c is consider plot can i have brainlest answer please

5 0
3 years ago
How to delete account on this
qwelly [4]

Answer:

Explanation:

Go and edit your profile then go on prefernces you will see that its written delete my account and that's how you delete your account on brainly.com and if you want to delete you account on phone then

Open your phone's Settings app.

Tap Accounts. If you don't see "Accounts," tap Users & accounts.

Tap the account you want to remove Remove account.

If this is the only Google Account on the phone, you'll need to enter your phone's pattern, PIN, or password for security.

Hope this helped you!

5 0
3 years ago
Read 2 more answers
Other questions:
  • . A program that can run more than one thread at once is called:
    9·1 answer
  • What is one disadvantage of accessing the Internet through a public search engine such as Google or Yahoo?
    10·2 answers
  • "To take advantage of these developments in the digital world, new approaches, concepts,instruments, and methods are needed, whi
    8·1 answer
  • You are the IT administrator for a small corporate network. Recently, you added a web server that runs services that need to be
    12·1 answer
  • Advantages of heading attributes
    5·1 answer
  • A technician has just installed a video card in a PC. The video card is not working, althoughit was working fine on the test ben
    6·1 answer
  • Write a Java application that uses the Math class to determine the answers for each of the following: a. The square root of 37 b
    10·1 answer
  • A garments manufacturing company buys various types of natural and synthetic materials to produce clothes. Which material is a s
    6·2 answers
  • Nathan has a 30-second clip of music that he wants to play over and over again when he runs a program. What does Nathan need to
    5·2 answers
  • How many different four-letter combinations for a locker password can you make with the lowercase and uppercase forms of the fir
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!