Computer Science, asked by XxYatashixX, 2 months ago

OUTPUT Of Python C.ode

myfile=open(r'C:\Users\91799\Downloads\poem.txt',"r")
str=myfile.read()
print(str)
myfile.close()
myfile=open(r'C:\Users\91799\Downloads\poem.txt',"r")
str1=""
size=0
tsize=0
while str1:
str1=myfile.readline()
tsize=tsize+len(str1)
size=sixe+len(str.strip())
print("size of file after removing all EOL characters&blank lines:")
print("the total size of the file:",tsize)
myfile.close()
myfile=open(r'C:\Users\91799\Downloads\poem.txt',"r")
s=myfile.readlines()
linecount=len(s)
print("number of lines in poem.txt is",linecount)
myfile.close()


SPAMMERS ANSWERS WILL BE REPORTED.​

Answers

Answered by Anonymous
0

Answer:

myfile=open(r'C:\Users\91799\Downloads\poem.txt',"r")

str=myfile.read()

print(str)

myfile.close()

myfile=open(r'C:\Users\91799\Downloads\poem.txt',"r")

str1=""

size=0

tsize=0

while str1:

str1=myfile.readline()

tsize=tsize+len(str1)

size=sixe+len(str.strip())

print("size of file after removing all EOL characters&blank lines:")

print("the total size of the file:",tsize)

myfile.close()

myfile=open(r'C:\Users\91799\Downloads\poem.txt',"r")

s=myfile.readlines()

linecount=len(s)

print("number of lines in poem.txt is",linecount)

myfile.close()

Answered by Anonymous
0

Answer:

After Running Above Python C.ode The Output produced is Given in The Above Attachment.

Python Version is Python IDLE 3.8.6 shell

The Answer is an Original answer.

Attachments:
Similar questions