What is a function used for opening files?, load, run, open, By default the file is opened in text mode, but you can also open the file in binary mode. Which one of the following syntaxes opens the file in binary mode?, x = bopen('demofile.txt'), x = open('demofile.txt', 'b'), The default opening mode when opening a file with the open() function is 'a' for 'reading'., true, false, After opening a file with the open() function, which method can be used to write the content?, list(), read(), show(), write(), To read only one line, we can use another method, which one?, readline(), lread(), readl(), If you call the readline() method two times, it will return the two first lines., true, false, After opening a file with the open() function, which method can be used to read the content?, list(), read(), show(), To read only one line, we can use another method, which one?, readline(), readline, If you call the readline() method two times, it will return the two first lines., true, false, What happens to the original file content if you open a file like this: ‘a’, you can write at the end, write from a start, with open('demofile3.txt', 'w') as f:, It will return an error, A file will be created, open('demofile3.txt', 'w'), The original content will be overwritten, Any new content will be added after the original content, with open('demofile3.txt', 'w') as f:, error, not error, What could you replace the 'w' with to instead return an error if the file already exists?, 'x', 'b', To read only one line, we can use another method, which one?, readline(), lread(), readl().
0%
Python
Ibahagi
Ibahagi
Ibahagi
ni
Almas92
Class 10
I-edit ang Nilalaman
I-print
Naka-embed
Higit pa
Mga Assignment
Leaderboard
Magpakita pa
Huwag gaanong magpakita
Ang leaderboard na ito ay kasalukuyang pribado. I-click ang
ibahagi
upang gawin itong pampubliko.
Ang leaderboard na ito ay hindi pinagana ng may-ari ng aktibidad.
Hindi pinagana ang leaderboard na ito dahil ang iyong mga pagpipilian ay naiiba sa may-ari ng aktibidad..
Ibalik ang Opsyon
Pagsusulit
ay isang bukas na template. Hindi ito bumubuo ng mga marka para sa isang leaderboard.
Kailangan maglog-in
Estilo ng visual
Mga Font
Kailangan ang subscription
Mga pagpipilian
Magpalit ng template
Ipakita lahat
Mas marami pang format ang lilitaw habang nilalaro ang aktibidad.
Buksan ang mga resulta
Kopyahin ang link
QR code
Tanggalin
Ibalik ng awtomatikong pag-save:
?