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
Aniyah is setting up a group of computers in her office that will share several devices. Which type of operating system should s
jenyasd209 [6]

Answer:

B

Explanation:

the software needs to share thus should be networked

8 0
2 years ago
2. Create 4 riddleson keywords which is related to fire wall.​
Alona [7]

Answer:

It's been so good to have you as a friend:

2. As sweet and rich as honey-colored sun

3. Slanting steep across a summer lawn,

4. Gilding life with all that love can lend.

5. And now that you yourself have griefs to tend,

6. I want to be the strong and caring one

7. To count to you the lovely things you've done

8. Until these troubles pass and sorrows end.

9. You are so beautiful in form and soul

10. That you bring happiness to all you're near:

11. Just as a sea rose, flowering in mist,

12. Makes a paradise of some bleak shoal,

13. Turning truth to something far more clear,

14. No pain unsoothed or rain-swept cheek unkissed.

good~0~as_a_friend . good_to_have~Slanting~lawn .

It's_been~so_good~as_a_friend .

to_have~griefs_to~form_and_soul

Explanation:

7 0
3 years ago
What is garbage in garbage out?​
Neko [114]

Answer: it means if you give a bad input it will result in a ad output.

Explanation:

It has n acronym GIGO which refers to how the quality of an output is determined by the quality of input.

Garbage is trash info... or input. And grabage out is the trash output.

8 0
2 years ago
Rajesh is considering whether to use a web app to collaborate with a group of friends on a project. What is one reason he should
vivado [14]

Rajesh might want to avoid the use of a web app for the project due to connectivity issues. Hence, one reason he might want to avoid using the Webb app is slow or poor internet connection.

Collaborating on a web application relies very heavily on network connectivity which is the what establishes the link ms allows the apllications to achieve optimum performance.

Therefore, slow internet connection is a major reason whuhe might want to avoid using a web app.

Learn more : brainly.com/question/25531734

6 0
2 years ago
The rules that govern the correct order and usage of the elements of a language are called the of the language:.
Strike441 [17]

The syntax of a language are the rules that govern the correct order and usage of the elements of a language.

<h3>What is a programming language?</h3>

This is a set of rules that are used to send commands to a computer system as a prompt to have it perform certain tasks.

The syntax of a language are the rules that are used in that particular programming language.

Read more on syntax here: brainly.com/question/21926388

7 0
2 years ago
Other questions:
  • You have a large dataset that will print on several pages. You want to ensure that related records print on the same page with c
    11·1 answer
  • True/False: When you make a function call, the order of the arguments you send does not matter as long as the number of argument
    15·1 answer
  • Given the integer variables x, y, and z, write a fragment of code that assigns the smallest of x, y, and z to another integer va
    7·1 answer
  • Dimensional arrays can be created using loops. 2 dimensional arrays can be created using:
    10·1 answer
  • I'm trying to network two laptops together using ethernet cable but it isn't working. Why isn't it working
    9·1 answer
  • Write a program to generate a square wave with 80% duty cycle on bit P2.7 Microprocessor.​
    7·1 answer
  • You are comparing cryptographic solutions to implement at your organization. Which two items should you focus on when you are ev
    12·1 answer
  • What are the advantages of saving files in a cloud? <br>Please help!! ​
    11·2 answers
  • PLS HEEELLLP ASAP, DONT JOKE
    9·2 answers
  • As of 2019, approximately how much of the world population actively access the internet?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!