
Uso de Arquivos em Python

Quiz
•
Information Technology (IT)
•
10th Grade
•
Hard
Luciano Topolniak
Used 3+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
Qual é o modo padrão de abertura de arquivos em Python usando a função `open()`?
'w'
'r'
'a'
'x'
2.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
O que acontece se você tentar abrir um arquivo inexistente no modo 'r'?
O arquivo é criado automaticamente.
Um erro do tipo FileNotFoundError é lançado.
O arquivo é aberto em branco.
O Python ignora a operação.
3.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
Qual é a principal vantagem de usar o bloco `with` ao trabalhar com arquivos em Python?
Permite abrir vários arquivos ao mesmo tempo.
Garante o fechamento automático do arquivo após o uso.
Torna o código mais lento.
Permite modificar arquivos somente para leitura.
4.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
Qual dos modos abaixo permite adicionar conteúdo ao final de um arquivo sem apagar o conteúdo existente?
'w'
'r'
'a'
'x'
5.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
Após abrir um arquivo com `open('arquivo.txt', 'w')`, o que acontece com o conteúdo anterior do arquivo?
O conteúdo anterior é mantido.
O conteúdo anterior é apagado.
O arquivo é renomeado.
O arquivo é movido para outra pasta.
6.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
Qual comando é utilizado para fechar um arquivo manualmente em Python?
file.close()
file.end()
file.stop()
file.quit()
7.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
O que acontece se você tentar ler um arquivo já fechado?
O Python lê normalmente.
Um erro do tipo ValueError é lançado.
O arquivo é reaberto automaticamente.
O conteúdo é retornado como uma string vazia.
Create a free account and access millions of resources
Similar Resources on Wayground
12 questions
Casa de Peixes

Quiz
•
10th Grade
10 questions
Data Transmission and Compression Quiz

Quiz
•
10th Grade
8 questions
Quiz sobre P5.js e JavaScript

Quiz
•
1st Grade - University
15 questions
Quiz de Comandos do Scratch

Quiz
•
10th Grade
15 questions
Introdução à Programação: Algoritmos e Conceitos Básicos

Quiz
•
10th Grade
15 questions
Prova PR: Algoritmos: HTML, CSS, JS

Quiz
•
9th - 12th Grade
10 questions
Estilos e Cores no CSS

Quiz
•
10th Grade
10 questions
Conceitos de lógica usando Portugo Studio

Quiz
•
10th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Information Technology (IT)
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
6 questions
Rule of Law

Quiz
•
6th - 12th Grade
15 questions
ACT Math Practice Test

Quiz
•
9th - 12th Grade
18 questions
Hispanic Heritage Month

Quiz
•
KG - 12th Grade
10 questions
Would you rather...

Quiz
•
KG - University