Answer:
\n
Explanation:
readline() method is used to read one line from a file. It returns that line from the file.
This line from the file is returned as a string. This string contains a \n at the end which is called a new line character.
So the readline method reads text until an end of line symbol is encountered, and this end of line character is represented by \n.
For example if the file "abc.txt" contains the lines:
Welcome to abc file.
This file is for demonstrating how read line works.
Consider the following code:
f = open("abc.txt", "r") #opens the file in read mode
print(f.readline()) # read one line from file and displays it
The output is:
Welcome to abc file.
The readline() method reads one line and the print method displays that line.
You have been given the following String which represents a series of 6 side die rolls:rolls = "1,5,2,3,5,4,4,3,1,1,1,2,3,1,5,6,
Anni [7]
Answer:
see explaination
Explanation:
rolls="1,5,2,3,5,4,4,3,1,1,1,2,3,1,5,6,2"
list1 = list(rolls.split(","))
print("The total # of rolls: {}".format(len(list1)))
j=0
for i in list1:
j+=int(i)
print("Total value of all rolls: {}".format(j))
print("Average roll: {}".format(j/len(list1)))
Please kindly check attachment for program code and output
Answer:
Explanation:
✓ computer can be used Interactive Learning apps, whereby students can share knowledge
✓Access to Information on the go: computer can be searched when educational information is needed
✓Virtual Classrooms : Incase of online classroom computer can be of help where both teacher student can meet online
✓Data processing and presentation ; computer can be used by both teacher and student in processing of data's.
✓Computer Literacy Education : for Literacy Education, computer can be used in training students to become computer literate.