Quiz
5
This quiz has question types that open in the usual player.
Questions in this quiz (18)
1Razlika rfind() i find()- rfind() the [blank_start]end[blank_end] of the string
- Aend
2As you can see, systems derived from Unix/Linux don’t use the disk drive letter (e.g., C:) and all the directories grow from one root directory called [blank_start]/[blank_end] ,while Windows systems recognize the root directory as [blank_start]\[blank_end].
- A/
- B\
3The operation of connecting the stream with a file is called [blank_start]opening[blank_end] the file, while disconnecting this link is named [blank_start]closing[blank_end] the file.
- Aopening
- Bclosing
4If you want to get rid of the object, you invoke the method named [blank_start]close[blank_end]().
- Aclose
5"r” open mode: [blank_start]read[blank_end]
- Aread
6“w” open mode: [blank_start]write[blank_end]
- Awrite
7“a” open mode: [blank_start]append[blank_end]
- Aappend
8“r+” open mode: [blank_start]read[blank_end] and [blank_start]update[blank_end]
- Aread
- Bupdate
9“w+” open mode: [blank_start]write[blank_end] and [blank_start]update[blank_end]
- Awrite
- Bupdate
10If there is a letter b at the end of the mode string it means that the stream is to be opened in the [blank_start]binary[blank_end] mode.
- Abinary
11If the mode string ends with a letter t the stream is opened in the [blank_start]text[blank_end] mode.
- Atext
12You may think of the yield keyword as a smarter sibling of the [blank_start]return[blank_end] statement
- Areturn
13We said earlier that any stream operation must be preceded by the [blank_start]open[blank_end]() function invocation.
- Aopen
14We’ve assumed that your sample text is placed in a text file name [blank_start]text[blank_end].txt.
- Atext
15If you want to treat the file’s contents as a set of lines, not a bunch of characters, the [blank_start]readline[blank_end]() method will help you with that.
- Areadline
16The [blank_start]readlines[blank_end]() method, when invoked without arguments, tries to read all the file contents, and returns a list of strings, one element per file line.
- Areadlines
17Reading from a binary file requires use of a specialized method name [blank_start]readinto[blank_end](), as the method doesn’t create a new byte array object, but fills a previously created one with the values taken from the binary file.
- Areadinto
18An alternative way of reading the contents of a binary file is offered by the method named [blank_start]read[blank_end]().
- Aread
Information
- Description
- Quiz on 5, created by Matija Nnn on 28/09/2019.
- Author
- Matija Nnn
- Language
- English
- Views
- 1
- Rating
- No ratings yet Rate this quiz