Which line creates an empty dictionary?, {}, dict(), Both A and B, [], Which data type is immutable?, List, Set, Dictionary, Tuple, Which symbol is used for comments?, //, #, %, /*, Which keyword is used to handle exceptions?, Catch, Except, Error, Throw, Which module generates random numbers?, math, random, os, sys, Which keyword skips the current iteration?, break, stop, continue, pass, What is the output? print(10%3), 3, 1, 0, 10, Which keyword creates an anonymous function?, lambda, func, anonymous, define, What is the output? print("5" + "5"), 10, 55, error, 25, Which function removes all items from a list?, remove(), delete(), clear(), pop(), Which statement is true?, Tuples are mutable., Lists are immutable., Strings are immutable., Sets allow duplicate values., Which keyword is used to create a generator?, generate, return, yield, next, Which function checks the memory address of an object?, id(), type(), mem(), object(), Which data type is unordered?, list, tuple, string, set, What is the output? print("10" * 3), 30, error, 101010, 1000, Which keyword is used to skip writing code inside a function?, skip, continue, break, pass, Which method removes the last item in a list?, remove(), pop(), clear(), delete, Which operator has the highest precedence?, +, **, *, //, What will this print? print(any([0, "", False, 5])), True, False, error, none, Which built-in function returns both the index and value while looping?, range(), enumerate(), zip(), map(), What is the output? print([i*i for i in range(5) if i % 2 == 0]), [0, 1, 4, 9, 16], [0, 4, 16], [1,9], error, Which function is lazy evaluated?, list(), tuple(), dict(), range(), What is the output? x = [[1]*3]*3x[0][0] = 9print(x), [[9,1,1],[1,1,1],[1,1,1]], [[9,1,1],[9,1,1],[9,1,1]], error, [[1,1,1],[1,1,1],[1,1,1]], What is the output? print(bool("False")), False, True, error, none, What is the output? print({1,2,3} & {2,3,4}), {1,2,3,4}, {2,3}, {1,4}, none, Which statement is true?, Dictionary keys must be mutable., Dictionary values must be unique., Lists can be dictionary keys., Dictionary keys must be immutable., What is the output? def f(a=[]): a.append(1) return aprint(f())print(f()), [1][1], [1][1, 1], [][], error, Which principle allows the same method to behave differently based on the object?, Inheritance, Polymorphism, Encapsulation, Abstraction, What is the purpose of the pass statement?, Skip the current loop iteration, Exit the program, Act as a placeholder where code will be added later, Ignore exceptions, What is the main advantage of using generators?, Reduced memory usage by generating values on demand, Faster printing, Easier debugging, Automatic sorting
0%
Python questions
Compartilhar
Compartilhar
Compartilhar
de
Arunadev7677
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:
?