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
1
Answer:
Hello, world!\nHow are you?
Answered by
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
Math,
3 months ago
Chemistry,
3 months ago
India Languages,
3 months ago
Science,
7 months ago
Math,
1 year ago
Social Sciences,
1 year ago
Math,
1 year ago