recuperacao 1 programação desenvolvimento de sistemas

Quiz
•
Other
•
12th Grade
•
Easy
SILVIO HENRIQUES PEREIRA
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Qual das opções abaixo define corretamente uma função em Python?
`function soma(a, b):`
`def soma(a, b):`
`fun soma(a, b):`
`define soma(a, b):`
2.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Qual das alternativas representa corretamente um laço de repetição que imprime os números de 0 a 4 em Python?
`for i in range(5): print(i)`
`for i = 0; i < 5; i++: print(i)`
`while i < 5: print(i)`
`repeat 5 times: print(i)`
3.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Qual é a principal diferença entre funções e métodos em Python?
Funções são definidas fora de classes, métodos dentro de classes.
Métodos não podem receber parâmetros.
Funções não podem retornar valores.
Não existe diferença.
4.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Em programação orientada a objetos, o que é um construtor em Python?
Um método chamado `__init__` que inicializa o objeto.
Uma função que destrói o objeto.
Um atributo da classe.
Um operador especial.
5.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Considere o seguinte código: ```python class Animal: def falar(self): print("Som de animal") ``` Como você cria um objeto da classe `Animal` e chama o método `falar`?
`obj = Animal(); obj.falar()`
`obj = Animal; obj.falar()`
`obj = Animal(); obj->falar()`
`obj = new Animal(); obj.falar()`
6.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Qual das alternativas representa corretamente a chamada de um método de instância em Python?
`obj.metodo()`
`obj->metodo()`
`metodo(obj)`
`obj:metodo()`
7.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Nádia está desenvolvendo um e-commerce chamado Buscante, um buscador de livros. Ela está implementando classes e objetos em Python para organizar melhor seu código e representar os livros vendidos em sua loja:
class Livro:
pass
livro1 = Livro()
Considerando que ela começa escrevendo o código acima, qual alternativa melhor descreve o funcionamento do código escrito por Nádia?
Nádia tentou criar uma função chamada Livro, mas esqueceu de definir o corpo da função.
Nádia declarou uma classe chamada Livro e depois criou um objeto chamado livro1 com a função Livro().
Nádia declarou uma classe chamada Livro e instanciou essa classe criando um objeto chamado livro1.
Nádia declarou uma classe chamada livro1 e criou uma instância chamada Livro.
Create a free account and access millions of resources
Similar Resources on Wayground
11 questions
Carta de Leitor

Quiz
•
12th Grade
10 questions
Exercícios / Substantivos

Quiz
•
9th - 12th Grade
10 questions
Rec.AV1 - Pensamento Comp. 1 ano

Quiz
•
1st Grade - University
10 questions
3a geração modernismo

Quiz
•
12th Grade
7 questions
Revisão PV

Quiz
•
12th Grade
12 questions
Curso de HTML e CSS

Quiz
•
1st Grade - University
10 questions
MATEMÁTICA 08/10

Quiz
•
6th Grade - University
10 questions
Teste!

Quiz
•
12th Grade
Popular Resources on Wayground
12 questions
Unit Zero lesson 2 cafeteria

Lesson
•
9th - 12th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
20 questions
Lab Safety and Equipment

Quiz
•
8th Grade
13 questions
25-26 Behavior Expectations Matrix

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

Interactive video
•
6th - 10th Grade
Discover more resources for Other
12 questions
Unit Zero lesson 2 cafeteria

Lesson
•
9th - 12th Grade
13 questions
25-26 Behavior Expectations Matrix

Quiz
•
9th - 12th Grade
20 questions
Lab Safety and Lab Equipment

Quiz
•
9th - 12th Grade
20 questions
Getting to know YOU icebreaker activity!

Quiz
•
6th - 12th Grade
6 questions
Secondary Safety Quiz

Lesson
•
9th - 12th Grade
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
21 questions
Set SMART Goals

Lesson
•
9th - 12th Grade
20 questions
Lab Equipment Quiz Chemistry

Quiz
•
9th - 12th Grade