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]
3 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]3 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
Unlike memory, this type of storage holds data and programs even after electrical power to the computer system has been turned o
Scrat [10]

Answer:

Secondary memory.

Explanation:

Unlike main memory which loses its content when electrical power to the system is turned off, secondary memory is volatile and persistent in nature. i.e it retains its content whether or not power is supplied to the computer that is holding it. As a matter of fact, they (secondary memory) are meant to store data permanently. Examples of such memory are the hard drives, floppy disks, flash drives, CDs and CDROMs.

Also, unlike the primary or main memory that can be accessed directly by the processor of the computer housing it, secondary memory are not accessed directly.

8 0
2 years ago
____ is an iterative software development process that focuses on team productivity and delivers software best practices to all
cluponka [151]

Answer:

RUP

Explanation:

RUP or Rational Unified Process is an IBM's software that divides the development process in four phases. It was developed to work throughout the entire software development life cycle, it's adaptive.

I hope you find this information useful and interesting! Good luck!

5 0
3 years ago
How to burn mp3 on dvd
ki77a [65]
Look up on google a software that can do it for you. Doing it through a pre-made software is about the only way to do it most computers won't allow you to.

7 0
3 years ago
Read 2 more answers
In order for you to make a wireless connection it must first find an availble
erastova [34]
It sounds like you are looking for a network. If a node can not find a network to connect to, then it cannot connect.
7 0
3 years ago
help:(What are the uses of various lights? How are they all different? How do you decide on their usage? How can you use natural
Monica [59]

Answer:

This is one of the most common types of lighting. Ambient light is a soft glow that blankets your space just enough for you to function without causing a harsh glare. In photography and cinematography, ambient light is considered the "natural light" within a room. In décor, ambient light is very similar, except you create the ambient light by making the room's lighting as natural and flat as possible. While ambient light is meant to get you safely from point A-to-B, it is not ideal for working closely with things or to highlight things around your space. When used correctly, ambient light creates a fantastic environment to relax from an overly stressful day or to have a warm conversation with an old friend. Ambient lighting is often referred to as mood lighting, because this light captures the soft curves of your face and allows your pupils to dilate slightly (a physical sign of affection). Some yoga studios have even begun using the softer ambient lighting in their classes to help draw stress from the body. This is a smaller more concentrated light. You want task lighting around when you’re working. In fact, some people call it office lighting. Task lighting is meant to help you see when you’re doing projects in which you need a finer light, such as, reading, cooking, writing, sewing and many other things. Task lighting only works well when it is used as a contrasting light. For example, if you have a low lit room with a swing arm lamp turned on over your desk, the light over the desk surface will be more effective with less glare or shadow-effect than if the entire room was lit with a brighter light. Task lighting helps naturally stimulate your brain. The contrasting light allows you to be more alert and concentrated. This will help you see more details as you work, creating higher quality results. This is why many businesses choose to use task lighting in their offices.

Explanation:

5 0
3 years ago
Other questions:
  • Is Digital technology always better or should we champion or even return to innovative of analog machines and experiences? Apex
    13·1 answer
  • Why is wearable technology important?
    12·1 answer
  • Consider an application that transmits data at a steady rate (for example, the sender generates an N-bit unit of data every k ti
    8·1 answer
  • You are the administrator of a Windows network. When creating a new user account, you specify a security clearance level of top
    8·1 answer
  • What factor(s) should be considered when determining whether a business is too far based on the query and the user location? Sel
    10·1 answer
  • When addictions escalate and the individual loses his or her job or drops out of school, _______________.
    12·2 answers
  • Identify traits of entrepreneurs. Check all of the boxes that apply.
    11·1 answer
  • Similarities between inline css and internal css​
    6·1 answer
  • 1. Software that is designed to intentionally cause harm to a device, server, or network is A. outware B.loggerware C.
    12·1 answer
  • How do you enlarge an image to see more detail on it? (1 point)
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!