WHAT IS THE OUTPUT OF THE FOLLOWING CODE FRAGMENT? EXPLAIN.
>>> OUT = OPEN(“OUTPUT.TXT”,”W”)
>>> OUT .WRITE(“HELLO, WORLD!\N”)
Answers
Answered by
3
Answer:
Hey! This is in python...
First of all, python is case-sensitive, so this gives an error as no function named OPEN... If you write it as..
>>>out = open("output.txt", "w")
>>> out.write("Hello, world!\n")
This opens a file called output.txt in the current directory and writes "Hello world" in the file...
# HOPE THIS HELPS!!
# PLEASE MARK AS BRAINLIEST!!
Similar questions