Computer Science, asked by ribannongshli, 3 months ago

Q6. What is the output of the following code fragment explain? (5)
out = file ("output.txt","w”)
out.write ("Hello, world! \n")
out.write ("How are you?")
out.close()
file ("output.txt").read()​

Answers

Answered by suryatheesmas
1

Answer:

Hello, world!\nHow are you?

Answered by Chaitanya1696
1

The output of the following coding fragment is:-

Hello, world!

How are you?

  • In the following coding fragment that has been given it has been said that two output sentences will be generated out of it.
  • Here in the given question, we have been provided with the coding fragment and we have been instructed to write outcomes at will be coming out of or created out of the coding that has been mentioned over here.
  • Here, in a given question, it has been mentioned that the outputs will be the given sentences that are mentioned inside the coding.
  • Hence, the output of the following coding fragment is Hello, world!
  • How are you?.

Similar questions