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
steposvetlana [31]
3 years ago
5

Write a function named replace_at_index that takes a string and an integer. The function should return a new string that is the

same as the old string, EXCEPT with a dash in place of whatever character was at the index indicated by the integer. Call your function on the word eggplant and the index 3
Computers and Technology
1 answer:
aalyn [17]3 years ago
4 0

Answer:

def replace_at_index(str, number):

   new = str.replace(str[number], "-")

   return new

print(replace_at_index("eggplant", 3))

Explanation:

- Create a function called <em>replace_at_index</em> that takes a string and an integer

- Initialize a new variable called <em>new</em>, that will hold the new string

- Replace the character at given index with dash using <em>replace</em> function, it takes two parameters: the first is the character we want to replace, the second is the new character.

- Return the new string

- Call the function with the required inputs

You might be interested in
Which is an example of an effective study skill?
Lelu [443]

Answer:

the making note cards and quizzing yourself

Explanation:

5 0
3 years ago
Read 2 more answers
Live preview is available on a touch screen T/F
TEA [102]
<span>It is false that live preview is available on a touch screen. Life preview refers to cameras mostly, and to the fact that its display screen can be used as a viewfinder. Viewfinder is what you look through when you are using a camera to take a photo, or to focus on something. So, no, touch screen devices do not have this feature available, only the "old-school" cameras do.</span>
3 0
3 years ago
To create a formula in______, you would first click in one of the cells​
Pavlova-9 [17]

Answer:excel

Explanation:

5 0
3 years ago
Read 2 more answers
What changes has Sue made so far? Check all that apply.
Alexus [3.1K]

Answer:

Its C, E, and F

Explanation:

On edg

8 0
3 years ago
Read 2 more answers
Consider the unsigned decimal number 35. What is the value in hexadecimal?<br><br> 1. 3510 = ____ 16
Liula [17]

Answer:

23_{16}

Explanation:

When we convert any decimal number into the hexadecimal number we have to divide that number with 16.

Now according to question the decimal number is 35.

Now to convert this in hexadecimal divide it with 16.

\frac{35}{16} =2\frac{3}{16}

This means the quotient is 2 and the remainder is 3.

Therefore the value of hexadecimal is,

23_{16}

Therefore,

35_{10}=23_{16}.

 

8 0
3 years ago
Other questions:
  • What allows people to create their own radio shows over the internet?
    14·1 answer
  • You should use html elements instead of server controls when
    11·1 answer
  • Write a recursive function, replace, that accepts a parameter containing a string value and returns another string value, the sa
    5·1 answer
  • If you specify a user without specifying a hostname, mysql will
    13·1 answer
  • What is the keyboard shortcut used to paste previously copied text?
    15·2 answers
  • Using a caesar cypher with an offset of three characters (a -&gt; d, b -&gt;e, ...., z -&gt; c), what would be the correct cyphe
    6·1 answer
  • You are given a 5-letter word (for example, abcde). Write a C-Program which outputs all possible unique 5 letter permutations of
    13·1 answer
  • 2. Why is there no country code for the USA?
    7·2 answers
  • python. create a program that asks the user to input their first name and their favorite number. Then the program should output
    12·1 answer
  • Data mining requires specialized data analysts to ask ad hoc questions and obtain answers quickly from the system. select one: t
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!