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
Vlada [557]
3 years ago
15

7.2.7: Part 1, Replace a Letter

Computers and Technology
2 answers:
Elza [17]3 years ago
4 0

def replace_at_index(txt, ind):

   new_txt = ""

   for x in range(len(txt)):

       if x == ind:

           new_txt += "-"

       else:

           new_txt += txt[x]

   return new_txt

print(replace_at_index("eggplant", 3))

I wrote my code in python 3.8. I hope this helps.

umka21 [38]3 years ago
3 0

Answer:

def replace_at_index(string, index):

   return string[0:index]+"-"+string[index+1:]

   

replaced_word = replace_at_index("house", 0)

print(replaced_word)

Explanation:

Simpler version

You might be interested in
Can include the 5-tuple information, which is the source and destination ip addresses, source and destination ports, protocols i
Delicious77 [7]

<span>The answer is Firewall Log.  The </span>Logging tab is a tabled, real-time and up-to-date integration of the traffic logs generated by the Firewall. It will show all the connections that have been active on your computer.  <span>You can also use the Windows Firewall log file to monitor TCP and UDP connections and packets that are blocked by the firewall.</span>

7 0
3 years ago
Where can the Ease of Access and Speech Recognition centers be found?
Bess [88]

Answer:

bottom right

Explanation:

at least on windows it's bottom right

3 0
4 years ago
Read 2 more answers
To differentiate the absolute pathnames to files that are located on different drives, html requires you to include the drive le
Ber [7]
<span>To differentiate the absolute pathnames to files that are located on different drives, HTML requires you to include the drive letter followed by a </span>vertical bar.
4 0
3 years ago
____ is the encapsulation of method details within a class.
Anestetic [448]

Implementation hiding i<u>s the encapsulation of method details within a class</u>. Implementation can be interpreted as those specifications which can be altered without altering the correctness of an application. Wrapping data/methods within classes (descriptions of the way all objects of this type will look/act) in combination with implementation hiding is called encapsulation. Information users need to know about behaviors should be available without dependence on implementation specifications.

6 0
3 years ago
Why is Apple using social media ?
jeka57 [31]

Apple uses social media to promote their products and increase user-engagement. This is a very effective method of advertising.

6 0
3 years ago
Other questions:
  • What is the output after the following code executes?
    14·1 answer
  • A computer application such as Microsoft Access that is used to store data and convert it into information is a ________________
    6·1 answer
  • Most programming languages provide loop statements that help users iteratively process code. In Coral you can write loops that h
    15·1 answer
  • To begin importing data from an excel spreadsheet, click on the ____ tab on the ribbon.
    11·1 answer
  • Which view is used to allow a publisher to view facing pages of a publication at the same time? Normal Master Page Two-Page Spre
    5·1 answer
  • Whats the best app for cheaters​
    9·1 answer
  • A lamp outside a front door comes on automatically when it is dark, and when someone stands on the doormat outside the front doo
    7·1 answer
  • What does running the “sudo” command do?
    6·1 answer
  • How has your perspective changed since the beginning of the class?
    5·1 answer
  • Determine which system you would recommend each of the customers use based on their provided user and system specs.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!