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
geniusboy [140]
3 years ago
13

7.2.7: Part 1, Replace a Letter

Computers and Technology
2 answers:
MrRa [10]3 years ago
6 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

GuDViN [60]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

s = replace_at_index("eggplant", 3)

print(s)

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

You might be interested in
Is Rick And morty A good show i know i lot of people say it is but can you give me a summary of why i should watch it i honestly
Colt1911 [192]

Answer:

that sauce is on the show

Explanation:

people are being toxic cause the new season is all to great

3 0
3 years ago
All of the 802. 11 standards for wireless networking support which type of communication path sharing technology?.
Tom [10]

Answer:

CSMA/CA. It stands for Carrier Sense Multiple Access/Collision Avoidance.

6 0
3 years ago
What type of cost will reduce with the introduction of a CAM system in a manufacturing plant?
Marysya12 [62]

Answer:

a.capital cost

Explanation:

because capital cost is to reduce introduction of CAM system

4 0
3 years ago
Write an if/else statement that adds 1 to the variable minors if the variable age is less than 18, adds 1 to the variable adults
boyakko [2]

Answer:

See Explanation

Explanation:

The answer you attached to the question is correct and it does not need any additional input.

However, I'll explain each line for you

This line checks if age is less than 18

if (age < 18) {  

This line increases minors by 1

minors = minors + 1;

}

This line checks if age is between 18 and 64

else if (age > 17 && age < 65) {  

This line increases adult by 1

adults = adults + 1;

}

This line checks if age is greater than 18

else {

This line increases seniors by 1

seniors = seniors + 1;

}

8 0
3 years ago
30 POINTS!!!
Alex Ar [27]

Answer:

cell phone, texting, social media,

Explanation:

6 0
3 years ago
Other questions:
  • Write an UPDATE statement that modifies the InvoiceCopy table. Change the PaymentDate to today’s date and the PaymentTotal to th
    7·1 answer
  • Write a program to prompt the user for a positive integer: N. The program will repeatedly divide the input in half using a loop,
    10·1 answer
  • im in honors comupter science and one of my questions is evaluate 18% 7 does anyone know how to answer that
    6·1 answer
  • Prepare a algorithm visualization for the Tower of Hanoi when 4 disks are to be moved from spindle #1 to spindle #3.
    12·1 answer
  • If $350 is the profit of an initial investment of $1000.00, what is the percentage profit?​
    11·2 answers
  • 25 POINTS FREE POINTS
    12·2 answers
  • Which keys should you press to insert a comment in OpenOffice Writer?
    15·2 answers
  • ¿Por qué en Colombia la mayoría de las empresas no son automatizadas (manejadas por computadoras y robots?
    15·1 answer
  • Need help plzz now it's hard ​
    5·1 answer
  • Match the roles to the task they perform.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!