您的位置:首页 > 编程语言 > Python开发

Coursera课程Python for everyone:chapter7

2016-02-17 11:13 369 查看


Chapter 7 Quiz

10 试题

Main Memory

Machine Language

Secondary memory

Motherboard

All the data from the file is read into memory and stored in the handle

The handle has a list of all of the files in a particular folder on the hard drive

The handle contains the first 10 lines of a file

The handle is a connection to the file's data

The list of folders to be searched to find the file we want to open

Whether we want to read data from the file or write data to the file

How large we expect the file to be

What disk drive the file is stored on

file_input()

cin

read()

raw_input()

It enables random movement throughout the file

It indicates the end of one line of text and the beginning of another line of text

It adds a new network connection to retrieve files from the network

It allows us to open more than one files and read them in a synchronized manner

for line in xfile:


while ((line = xfile.readLine()) != null) {


while (<xfile>) {


while line = xfile.gets


Reverse the order of the lines in mbox.txt

Count the lines in the file 'mbox.txt'

Remove the leading and trailing spaces from each line in mbox.txt

Convert the lines in mbox.txt to lower case

strip()

ljust()

find()

startswith()

setjmp / longjmp

try / catch / finally

try / except

signal handlers

Checks to see if the file exists and can be written

Prompts the user for a file name

Reads the entire file into the variable inp as a string

Turns the text in the file into a graphic image like a PNG or JPG
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息