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
tigry1 [53]
4 years ago
9

Write the function setKthDigit(n, k, d) that takes three integers -- n, k, and d -- where n is a possibly-negative int, k is a n

on-negative int, and d is a non-negative single digit (between 0 and 9 inclusive). This function returns the number n with the kth digit replaced with d. Counting starts at 0 and goes right-to-left, so the 0th digit is the rightmost digit.
Computers and Technology
1 answer:
liq [111]4 years ago
6 0

Answer:

Explanation:

Let's do this in Python, first we need to convert the number into string in order to break it into a list of character, then we can replace the kth character with d. Finally we join all characters together, convert it to integer then output it

def setKthDigit(n, k, d):

n_string = str(n)

d_char = str(d)

n_char = [c for c in n_string]

n_char[k] = d_char

new_n_string = ''.join(n_char)

return int(new_n_string)

You might be interested in
What is the name of the technology that is typically implemented on switches to avoid Ethernet connectivity problems when the wr
Andrew [12]

Answer:  Medium Dependent Interface Crossover (MDIX)

Explanation:

The technology that is typically implemented on switches to avoid Ethernet connectivity problems is Medium Dependent Interface Crossover(MDIX) For switches with Auto (MDIX) the connection is configured automatically and a crossover or straight-through cable can be used to connect two switches. When this MDIX interface is connected it corrects the connectivity speed and the cabling for proper device functionality.

4 0
4 years ago
I NEED IT NOWW
Montano1993 [528]

Answer: the answer ur looking for is  option : a

3 0
4 years ago
Read 2 more answers
Which version represents the video project after the assembly cut has been completed, transitions and special effects have been
yuradex [85]

Answer:

D.final cut

Explanation:

it well help for the non-liris editing in film or others

7 0
3 years ago
"In a web app, where is data usually stored? A. Mobile network B. Application storage C. Local computer D. Cloud storage"
ollegr [7]

Answer:

The answer is "Option C".

Explanation:

The local computer also refers to locally, it is a device, that is used by LAN. It is also called as a remote computer, in which all the data is stored in the main computer and accessible by protected password, and certain choices were wrong, which can be described as follows:

  • In option A, It is used in digital communication.
  • In option B, It is used in androids.
  • In option D, It is used to provides web services.
6 0
3 years ago
Which of the following uses the proper syntax for creating an HTML comment?
Harman [31]

Answer:

c

Explanation:

4 0
3 years ago
Other questions:
  • Which Tire would you use to explain a set of phones in an HTML document?
    12·1 answer
  • 1. Which of the following might be a problem taken on by environment engineers?
    8·1 answer
  • Who are some of my emails not all deleting on my android i have to use my laptop to see them to delete them?
    12·2 answers
  • Prior to the release of a movie, a film studio launches a website that allows people to play online games featuring actors in th
    15·2 answers
  • In linux, you are restricted to using only one type of filesystem on a system.
    15·1 answer
  • Playstation network live updates pes 2018 does it cost extra
    13·1 answer
  • What are some reasons a person might choose to remain anonymous on the Internet?
    12·2 answers
  • To print factorial of any<br>input number <br>QBASIC​
    6·1 answer
  • The _____ describes how data actually moves from an application on one computer to an application on another networked computer.
    9·1 answer
  • On a cdma (code division multiple access) network, how are mobile handsets identified by the carrier?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!