Maggie Samson
Quiz von , erstellt am more than 1 year ago

Geography Quiz am GEOM 73 - Python Quiz 9, erstellt von Maggie Samson am 14/04/2019.

39
1
0
Maggie Samson
Erstellt von Maggie Samson vor mehr als 5 Jahre
Schließen

GEOM 73 - Python Quiz 9

Frage 1 von 10

1

FTP stands for:

Wähle eine der folgenden:

  • File Transfer Protocol

  • File Translation Protocol

  • File Translation Procedure

  • File Transfer Procedure

Erklärung

Frage 2 von 10

1

Which method of the ftp class of the ftplib module uses ASCII mode to transfer files?

Wähle eine der folgenden:

  • retrtxt()

  • retrbinary()

  • retrascii()

  • retrlines()

Erklärung

Frage 3 von 10

1

When can you use urllib instead of ftplib to read and transfer files from an FTP server?

Wähle eine der folgenden:

  • anonymous FTP servers with a web interface

  • password protected FTP servers without a web interface

  • password protected FTP servers with a web interface

  • anonymous FTP servers without a web interface

Erklärung

Frage 4 von 10

1

How do you set the current directory using ftplib on an FTP server so you can navigate to the files you need?

Wähle eine der folgenden:

  • ftp.cwd(pathname)

  • ftp.path(pathname)

  • ftp.dir(pathname)

  • ftp.setdir(pathname)

Erklärung

Frage 5 von 10

1

When working with a ZIP file in Python using the zipfile module, how do you determine which files are present in the ZIP file without extracting them?

Wähle eine der folgenden:

  • open the file using something like zipfile.ZipFile("example.zip", "r"), then use the namelist method

  • open the file using something like zipfile.ZipFile("example.zip", "r"), then use the ziplist method

  • open the file using something like zipfile.ZipFile("example.zip", "r"), then use the read method

  • create a list of the files using something like zipfile.ListFiles("example.zip")

Erklärung

Frage 6 von 10

1

Which compression method is the default employed by the zipfile module in Python?

Wähle eine der folgenden:

  • ZIP_STORED

  • TAR

  • GZIP

  • ZIP_COMPRESSED

  • ZIP_DEFLATED

Erklärung

Frage 7 von 10

1

How would you extract all files in a ZIP file to the current working directory using the zipfile module in Python?

Wähle eine der folgenden:

  • ZipFile.openall()

  • ZipFile.extractall()

  • ZipFile.unzip()

  • ZipFile.extract("*")

Erklärung

Frage 8 von 10

1

You should never use XML to store geospatial data since it is text-based and will therefore render your geospatial data useless.

Wähle eins der folgenden:

  • WAHR
  • FALSCH

Erklärung

Frage 9 von 10

1

Which of the following module or libraries are used to work with XML data in Python? (check all that apply)

Wähle eine oder mehr der folgenden:

  • xml.sax

  • xmlopen

  • xmlparser

  • xml.dom

  • xmllib

  • xml.etree.ElementTree

Erklärung

Frage 10 von 10

1

XML files are notorious for missing or incorrect tags. Which module/library would you use in Python to parse XML files that contain tag errors?

Wähle eine der folgenden:

  • ElementTree

  • AlphabetSoup

  • BeautifulSoup

  • XMLfix

  • parseXML

Erklärung