Computer Science, asked by neetusharma1511, 6 months ago

WHAT IS THE OUTPUT OF THE FOLLOWING CODE FRAGMENT? EXPLAIN.
>>> OUT = OPEN(“OUTPUT.TXT”,”W”)
>>> OUT .WRITE(“HELLO, WORLD!\N”)

Answers

Answered by gaganadithyareddy9
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