Commit 08dc9064 by likorn

Fixed document's path here too

parent e95cfffe
Showing with 3 additions and 3 deletions
file = open("C:/Users/likorn/Documents/lab5/task2.txt", "r") file = open("task2.txt", "r")
for i in range(3): for i in range(3):
print(file.read(10)) print(file.read(10))
print("") print("")
...@@ -12,13 +12,13 @@ for line in file: ...@@ -12,13 +12,13 @@ for line in file:
print("\n\nThe number of characters in the text is " + str(sum_ch) + "\n") print("\n\nThe number of characters in the text is " + str(sum_ch) + "\n")
file.close() file.close()
file = open("C:/Users/likorn/Documents/lab5/task2.txt", "a") file = open("task2.txt", "a")
file.write("END TEXT") file.write("END TEXT")
file.close() file.close()
# to print the text with the added "END TEXT" # to print the text with the added "END TEXT"
# file = open("C:/Users/likorn/Documents/lab5/task2.txt", "r") # file = open("task2.txt", "r")
# file.seek(0) # file.seek(0)
# for line in file: # for line in file:
# print(line, end='') # print(line, end='')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment