0 of 20 Questions completed
Questions:
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
0 of 20 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
2. Operations of files?
3. syntax for open a file in read mode
4. Predict the output for following code?
file = open(“file.txt”, “r”)
print file.read(5)
5. In python no need to define file pointer, to use files
6. What is purpose of close fun in python files
7. What is syntax for to create a file in write mode
8. close() is must and should in files in python
9. Syntax for closing a file in python
10. _______function strips each line of a file off spaces from the right-hand side
11. This function strips each line of a file off spaces from the left-hand side.
12. What is output of bellow code
with open(“file.text”, “r”) as file:
data = file.readlines()
for line in data:
word = line.split()
print word
13. What is syntax for split()
14.what is output for bellow program
file =open(“ravi.txt”,”x”)
15. what is w+ mode
16. what rb+ mode
17. What is EOL?
18. Attribute of files i python
19. What is output of the below syntax
f = open(“ravi.txt”)
20. Syntax for rename of a file