Given a string, an integer position, and a character, all on separate lines, find the character of the string in that position and replace it with the character read. Then, output the result.

Ex: If the input is:

warn

0

e

the output is:

earn

Note: Using a pre-defined string function, the solution can be just one line of code.​

Answers

Answer 1

Answer:

The program in Python is as follows:

myStr = input()

pos = int(input())

chrr = input()

myList=[]

myList[:0]=myStr

myList[pos] = chrr

myStr =""

for i in myList:

   myStr+=i

print(myStr)

Explanation:

This gets input for the string

myStr = input()

This gets input for the character position

pos = int(input())

This gets input for the incoming character

chrr = input()

Create an empty list

myList=[]

Convert the string to a list

myList[:0]=myStr

Replace the character

myList[pos] = chrr

Empty the string

myStr =""

Get the new string

for i in myList:

   myStr+=i

Print the new string

print(myStr)

Answer 2

Following are the C++ program to replace the first index value of the string.

Program Explanation:

Defining header file.Defining the main method.Inside the main method three variable "Sval, Spos, Subchar" is declared in which "string, int, and char".After input variable value a string variable is declared with the at (method), which replaces the first index value with the character value.After replacing the first index value that is "0" use the prints method that prints its value.

Program:

#include <iostream>//header file

#include <string>//header file

using namespace std;

int main() //main method

{

 string Sval;//defining string variable

 int Spos;//defining integer variable

 char Subchar;//defining char variable

 cin>>Sval>>Spos>> Schar;//input value

 Sval.at(Spos)  =  Subchar; //using string variable that replaces the first index value with the character value

 cout << Sval << endl;//printing the replaced value

 return 0;

}

Output:

Please find the attached file.

Learn more:

brainly.com/question/24494143


Related Questions

Why does brainly always say, "We're sorry, but we are not able to complete your registration at this time"?! Now I cant view any answers to any questions!

Answers

Answer and Explanation:

It's very likely a network issue. You could do a hard refresh on your browser or brainly app. Simply clear your application's cache or your browser data or cache and then try again. You could also try re-installing your app. If this doesn't work, please reach out to the Brainly customer support team for help.

Can someone please type a code that makes a house in python and turtle graphics i need help

Answers

Answer:

import turtle  

turtle.speed(2)

#shape

turtle.forward(100)

turtle.left(90)

turtle.forward(100)

turtle.left(45)

turtle.forward(100)

turtle.left(90)

turtle.forward(100)

turtle.left(45)

turtle.forward(100)

turtle.left(90)

turtle.forward(100)

#door

turtle.left(90)

turtle.forward(50)

turtle.left(90)

turtle.forward(25)

turtle.left(90)

turtle.forward(50)

#windows

turtle.penup()

turtle.right(90)

turtle.forward(20)

turtle.right(90)

turtle.forward(20)

turtle.pendown()

turtle.forward(25)

turtle.left(90)

turtle.forward(40)

turtle.left(90)

turtle.forward(25)

turtle.left(90)

turtle.forward(40)

Explanation:

:)

what is the most improved Android robot​

Answers

Answer:

They are the humanoid robots.

1 punto
María tiene una empresa de mercancia
seca, dicha empresa brinda su servicio de
ventas de estas mercancías al por mayor y
menor para su clientela. ¿De qué tipo de
Comercio hablamos en este ejemplo?: *

Answers

Answer:

Retailing.

Explanation:

La venta al por menor o retailing es el suministro de bienes físicos a los consumidores para uso personal, sea en pequeña o grandes cantidades, siempre que esté destinado a consumidores finales. Es un sector que consta de diferentes ramas (como la industria alimentaria, la industria de la moda, la industria del mobiliario para el hogar, etc.). El comercio minorista es el último eslabón de la cadena de suministro que va desde el fabricante hasta el consumidor.

Which option is not available in the Presenter view of a presentation?

Answers

Group of answer choices.

A. Next Slide Preview

B. Pen/Laser Pointer tools

C. Open Slide Show

D. Navigation Controls

Answer:

C. Open Slide Show

Explanation:

PowerPoint application can be defined as a software application or program designed and developed by Microsoft, to avail users the ability to create various slides containing textual and multimedia informations that can be used during a presentation.

Some of the features available on Microsoft PowerPoint are narrations, transition effects, custom slideshows, animation effects, formatting options etc.

Basically, the views that are available on the Microsoft PowerPoint application includes;

1. Slide Sorter.

2. Notes Page.

3. Reading Pane.

4. Presenter view.

Presenter view avails the user an ability to use two monitors to display his or her presentation. Thus, one of the monitors displays the notes-free presentation to your audience while the other monitor lets you view the presentation with notes that you have added to the slides, as well as the navigation and presentation tools.

Furthermore, the Presenter view was developed by Microsoft Inc. to have the following options;

I. Next Slide Preview.

II. Pen/Laser Pointer tools.

III. Navigation Controls.

However, Open Slide Show is an option which is not available in the Presenter view of a presentation.

A ____ is an icon that does not directly represent a file, folder or application but serves as a link to it?​

Answers

Answer:

Shortcut

Explanation:

A file can be defined as a computer resource that avails end users the ability to store or record data as a single unit on a computer storage device.

Generally, all files are identified by a name, icon, size, and type (format) such as audio, image, video, document, system, text, etc.

Furthermore, files are organized or arranged in directories. These directories are paths that describes the location wherein a file is stored on a computer system.

A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer on how to perform a specific task and solve a particular problem. Thus, it's a computer program or application that comprises of sets of code for performing specific tasks on the system.

In Computer science, it's possible to create a shortcut in several directories (locations) on a computer, so as to reference a file, folder or software application and serve as an executable link.

Hence, a shortcut is an icon that does not directly represent a file, folder or application but serves as a link to it.

Additionally, deleting the shortcut of a data file, folder or software application would not permanently delete or uninstall the main data file respectively.

In terms of technology, wich of the four devices is the most recent?

a. keyboard
b. joystick
c. scanner
d. camera​

Answers

Joystick (1972)

They consider the typewriter a keyboard…late 1800’s
Scanner (1957)
Camera (late 1800)

Diana has created a graphic design portfolio for a major project. What kind of portfolio would increase Dlana's chances of getting selected?
OA
a portfolio with some case studies of her graphic design work
OB.
a portfolio with graphic designs in her favorite theme
Ос.
a portfolio containing contact numbers of references
OD.
a portfolio that emphasizes large images and many colors
OE. a portfolio that emphasizes her qualifications and experience

Answers

Answer:

Hello There!!

Explanation:

I believe the answer is O A. a portfolio with some case studies of her graphic design work.

hope this helps,have a great day!!

~Pinky~

3 Negative ways of using the Internet​

Answers

Answer:

1. It rots the mind of children

2. It's to too addicting

3. can show bad things.

Explanation:

1. Cyber bullying.
2. Gambling (playing games where you win money)
3. Identity theft, hacking.

Choose the word that matches each definition. 1. IP Address 2. Server 3. Port Each term is only used once._____________ a number used within a computer to identify a specific process ____________ a numerical reference to a particular device in a network ___________ a computer that handles requests and returns data to other computers in a network

Answers

Answer:

  Port      a number used within a computer to identify a specific process.

   IP Address     a numerical reference to a particular device in a network.

   Server           a computer that handles requests and returns data to other computers in a network.

Explanation:

A port number is a number used to uniquely identify a particular process, application or program on a computer. From the networking parlance, it is a logical address that uniquely identifies a process, protocol or application communicating with other process, protocol or application over a network. For example;

i. a file transfer protocol (FTP) could use a port number of 20 or 21.

ii. a simple mail transfer protocol (SMTP) could use a port number of 25

Internet Protocol (IP) address is a numerical reference or label assigned to a particular device in a network which helps to uniquely identify the device on the network. IP addresses (version 4) are expressed as a group of four numbers separated by a dot. For example, an IP address may look like this: 192.168.0.90

A server is a computer that receives requests from other computers, processes these requests and returns some data to the other computers  in a network. In reality, these servers and the computers they serve can actually be some applications or programs. Servers provide resources, data, services or programs to other computers over a network.

Answer:

IP address: an Internet Protocol (IP) address is a numerical reference to a particular device in a network

port: a number used within a computer to identify a specific process

server: a computer that handles requests and returns data to other computers in a network

Explanation:

edge 2022

Describa las etapas del arranque de viruta

Answers

Answer:

Las virutas son partículas que se eliminan mecánicamente de una pieza de trabajo mecanizada. En el contexto de la tecnología de fabricación, especialmente el mecanizado, el término se refiere principalmente a virutas de metal; En principio, sin embargo, las virutas se crean en todo tipo de mecanizado de cuerpos sólidos. Las astillas de madera son el resultado de la carpintería. Cuando se mecanizan plásticos, se crean virutas, así como cuando se mecanizan materiales minerales, cristalinos o amorfos como el vidrio, que a menudo se realiza mediante esmerilado.

When visiting or learning about other places, what new things have you experienced? Choose all that apply.
food and drink
music and art
languages
values and ideas
technology

Answers

This is a question that’s has no wrong or right answer, basically you just click whatever you’ve experienced.

Answer:

All of these answers

Explanation:

Have you searched Buzz Ch.at on playstore​

Answers

Answer:

Reorder terms.

y=52x−1

Cancel the common factor of 22.Factor 22 out of −2-2.

y−4=5x2+52⋅(2(−1))y-4=5x2+52⋅(2(-1))

Cancel the common factor.

y−4=5x2+52⋅(2⋅−1)y-4=5x2+52⋅(2⋅-1)

Rewrite the expression.

y−4=5x2+5⋅−1y-4=5x2+5⋅-1

Multiply 55 by −1-1.

y−4=5x2−5

¿Por qué es importante usar adecuadamente el celular?

Answers

Answer:

to stop it from breaking

Explanation:

Choose the issue that is occurring from the drop-down menu. During the , development teams transform the requirements into a software application design. During the , the software design is implemented by developers in code. In the , software is evaluated for quality. Any issues with the software are logged as to be resolved by developers. Software that is maintained by developers is said to be .

Answers

Answer: See explanation

Explanation:

During the, (software design phase), developmentt teams transform the requirements into a software application design.

During the (software development phase), the software design is implemented by developers in code.

In the (software evaluation phase), software is evaluated for quality.

Any issues with the software are logged as (bugs) to be resolved by developers.

Software that is maintained by developers is said to be (supported).

Answer:

1) 2

2) 1

3) 2

4) 2

5) 3

Explanation: just did it

5.2
Explain ONE reason why the special equipment is used when
testing eyesight for a driver's licence.
(2)​

Answers

Answer:

In order to reduce the risk of accidents on the roads.

Explanation:

The special equipment is used when  testing eyesight for a driver's license in order to reduce the risk of accidents on the roads. Good eyesight is very important for good and safe driving so to find out the eyesight of the driver, the license officer used special equipment in order to check driver's eyes. If the eyesight is good, the officer provide license to the person otherwise not so that no accidents happen on the road.

Hadoop is : open source software framework designed for distributing data-processing over inexpensive computers. data mining platform designed for storing and analyzing big data produced by web communications and transactions. high-speed platform used to analyze large data sets pre-configured hardware-software system designed for analyzing big data. NoSQL database technology that stores both data and procedures acting on the data as object

Answers

Answer: open-source software framework designed for distributing data-processing over inexpensive computers.

Explanation:

Hadoop refers to the collection of open-source software utilities which are important in facilitating the use of a network of several computers to solve big data.

It provides huge storage for different kinds of data, and the ability to handle concurrent tasks virtually. Therefore, the correct option is "open-source software framework designed for distributing data-processing over inexpensive computers".

What do you call a commercial transaction beyween a buisness and buisness thatis transactedd online?
A.B2B - commerce
B.B2.B commerce
C. B2b digital transaction
D.B2B e - commerce

E. Non of the above

Answers

Answer:

c.B2b digital transaction

Explanation:

yan lang po sana makatulong

If a user has just added a simple triangle shape into a diagram, how can the triangle be adjusted? Check all that
apply.

O by making it bigger

O by adjusting it to be SmartArt

O by making it smaller

O by adjusting it to be different style

O by making it thinner

O by making it thicker

O by adjusting it to be a different color

O by rotating it

Answers

Mark Brainliest please

Answer :

By making it bigger
By adjusting it to be SmartArt

The smallest piece of information a computer can store is

Answers

Answer:

bit

Explanation:

confia

A bit is the smallest piece of information in a computer, a single value storing either 0start text, 0, end text or 1start text, 1, end text. A byte is a unit of digital information that consists of 8 of those bits.

What is the next line?
>>>
tupleB = (5, 7, 5, 10, 2,5)
tupleB.index(5,3)
>>>
A. 0
B. 5
C. 3
D. 1

Answers

The right answer is option 4: 2

Explanation:

Lists are used in Python to store elements of same or different data types.

Different functions are used in Python on List. One of them is count.

Count is used to count how many times a specific value occurs in a list.

The syntax for count is:

listname.count(value)

In the given code,

The output will be 2

Hence,

The right answer is option 4: 2

Please help me with my question ​

Answers

Answer:

1. Template

2. Name of the website

3. Signature of the instructor

Which headphones are a better option, the HyperX Cloud Stinger or the Logitech G432

Answers

Answer:

The Logitech ones.

Explanation:

Surprisingly I've used all 3 of them and the Logitech ones are the one with not only the best sound quality. And the mic isn't horrible either.

Select the three reasons that the gaming industry is set to grow.

A) more colleges offering jobs in game design

B) a decrease in the average age of gamers

C) an expanding market on mobile phones

D) expanding markets in Asia

E) new accessories that will attract more players

Answers

The answers are A, C, E

Answer:

expanding markets in Asia, new accessories that will attract more players, an expanding market on mobile phones

Explanation:

Kiko loves to surf the internet and check on different websites. One day he received an email from unknown source. When he opens it, he was directed to a site and logged using his credit card number. After a few days,he learned that his card was use by someone in purchasing an expensive item. What internet threat did Kiko experience and what can you do to avoid it.​

Answers

He experienced phishing

Phishing is a method of trying to gather personal information using deceptive e-mails and websites.

Here are some measures to avoid phishing. You can pick up the one you liked the most

Always check the spelling of the URLs in email links before you click or enter sensitive informationWatch out for URL redirects, where you're subtly sent to a different website with identical designIf you receive an email from a source you know but it seems suspicious, contact that source with a new email, rather than just hitting reply. Don't post personal data, like your birthday, vacation plans, or your address or phone number, publicly on social media

An input value has to be greater than 18 and less than 65 if a driving license is to be approved for issue. What type of input checking is appropriate?

Answers

Answer:

You should use an "if" statement to check whether the number is greater than 18 or less than 65.

Explanation:

You usually use "if" statements whenever you want to compare a number to another. Keep in mind that "if" statements are not only used for comparison!

what type of computer system can be found in the computer lab at school?
A. mini
B. micro
C. Mainframe
D. super​

Answers

Answer:

B: micro

Explanations

a small computer that contains a microprocessor as its central processor.

A folder has been shared with other users and set to read-only. What does this mean for users?
Users can only read the name of the shared folder.
Users cannot add new folders or files.
Users can read and edit files.
Users can add new files but not new folders.

Answers

Answer:

It means that users can only read or, depending on that platform, read and edit files in the folder

list any three positive impacts of computer technology in our society?

Answers

Answer:

nWhich statement about the origins of the American population is true?

A most Americans descend from people who first populated this continent about 20,000 years ago

b about 98 percent of Americans live in this country due to the waves of Irish and German people who came in mid 1800s

c immigration expander the American population before 1806 ,bur has no significantly contributed to it since then

d the vast majority. of Americans ms either descended from immigrats or are immigrants themselves

Explanation:

sjsikskakakakakkakznxjduwjawjieieiwiwiwiwiwiw idek computer mouse laptopdhsjsjsjsjjsjs

Identify the error and write correct HTML program 5 Cyber Bullying Tips<\head>Don't Respond Talk to a trusted adult <|html>

Answers

Answer:

<html>

<head> Cyber Bullying Tips </head>

<body>

Don't Respond, Talk to a trusted adult

</body>

</html>

Other Questions
Texans bought liberty bonds to support WWI is it social or political Which lines from President Reagan's Address at Moscow State University contain an opinion? Select 3 options.Nancy couldn't make it today because she's visiting LeningradOne of these chips has more computing power than a roomful of old-style computersBut progress is not foreordained. The key is freedom-freedom of thought, freedom of informationYou know, one of the first contacts between your country and mine took place between Russian and AmericanexplorersPerhaps most exciting are the winds of change that are blowing over the People's Republic of ChinaAnd that's why it's so hard for government planners, no matter how sophisticated to ever substitute for millions ofindividuals What was the effect of the Supreme Court's decision in the case of Lochner v. New York ? The Progressive movement suffered a setback because a state law that limited the workday to ten hours was struck down . The Progressive movement suffered a setback because the court refused to hear the case. The Progressive movement succeeded because the court upheld the ten-hour workday limit. The Progressive movement succeeded because the court ruled that forcing laborers to work for ten hours per day was unconstitutional list out different daily activities to be accomplished by growing adolescents In technology the act of continual learning is critical. Technology changes rapidly and the need to stay up-to-date in this every changing field is critical. Explain what areas you enjoyed researching the most over the past 9 weeks. IT is a never ending discipline that required constant research. What additional areas of the class would you like to explore more after the course ends. How long do I have to stay up late to get sick? i need help with english please Solve for x. assume that lines which appear tangent are tangent. x= Find the domain and range of the function y = x-3 + 6 What happens if a protein-digesting enzyme is mixed with starch solution? Decrease 80ml by 40% Read the stanza from Shakespeares Sonnet 18.Shall I compare thee to a summer's day?Thou art more lovely and more temperate:Rough winds do shake the darling buds of May,And summer's lease hath all too short a date:What is the purpose of these lines?to complain about the intense heat and humidity of summerto persuade a loved one to visit during a warm seasonto express love by likening a loved one to a nice dayto argue that hot weather is more pleasant than cold weather PLEASE HELP WITH THIS QUESTION Would you say that an unnoticed and minor book was a seminal piece of literature? Why or why not? If f(x) = 2x - 1, find f'(x). what do you admire about benjamin franklin?please help I need this She is a .... Singer. She sings...... What is the frequency of a wave that passes a given point 412 times in 4.0seconds?O A. 0.0097 sOB. 103 HzO C. 408 SO D. 1650 HzSUBMIT Based on data from the U.S. Census Bureau, a Pew Research study showed that the percentage of employed individuals ages 25-29 who are college educated is at an all-time high. The study showed that the percentage of employed individuals aged 25-29 with at least a bachelor's degree in 2016 was 40%. In the year 2000, this percentage was 32%, in 1985 it was 25%, and in 1964 it was only 16%.+ What is the population being studied in each of the four years? a. college educated individuals b. college educated individuals aged 25-29 c. individuals aged 25-29 d. employed individuals aged 25-29 e. employed individuals Use the grouping method to express the polynomial below as product of its factors. Write each factor as a polynomial in descending order. x(5x-8)-3(5x-8) What is the product of the polynomials below?(4x2 - 2x - 4)(2x + 4)A. 8x? +12x-16-16B. Bx+12x? - 16X-8C. 8x +12x2 - 8x-16O D. Bx +12x2 - 8x-8