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
Compartilhar
Compartilhar
Compartilhar
de
Almas92
Class 10
Editar conteúdo
Imprimir
Incorporar
Mais
Atribuições
Ranking
Mostrar mais
Mostrar menos
Atualmente, este ranking é particular. Clique em
Compartilhar
para torná-lo público.
Este ranking foi desativado pelo proprietário do recurso.
Este ranking está desativado, pois suas opções e as do proprietário do recurso são diferentes.
Reverter opções
Questionário
é um modelo aberto. Ele não gera pontuações para um ranking.
Login necessário
Estilo visual
Fontes
Assinatura necessária
Opções
Alterar modelo
Mostrar todos
Mais formatos serão exibidos à medida que você executar a atividade.
Resultados em aberto
Copiar link
Código QR
Excluir
Restaurar arquivo salvo automaticamente:
?