·
Ciência de Dados ·
Programação
Send your question to AI and receive an answer instantly
Recommended for you
8
Simulado Compiladores Estacio
Programação
UMG
7
Atividade Objetiva 02 - Introdução a Linguangem Python
Programação
UMG
7
Atividade Objetiva 02 - Introdução a Linguangem Python
Programação
UMG
11
Prova Online - Introdução a Linguangem Python
Programação
UMG
4
Introdução a Programação
Programação
UMG
7
Atividade Objetiva 02 - Introdução a Linguangem Python
Programação
UMG
7
Atividade Objetiva 02 - Introdução a Linguangem Python
Programação
UMG
8
Atividade Objetiva 01 - Introdução a Linguangem Python
Programação
UMG
8
Atividade Pratica1
Programação
UNOPAR
9
Atividade Pratica
Programação
UNOPAR
Preview text
DEATH EATERS RECRUIT HEAVILY AMONG THE DISAFFECTED Brittany Spiegel October 4, 1995 LONDON--As violence continues to spread throughout the region, the wizarding community increasingly confronts an ugly truth: the Dark Lord's ranks are swelling. According to recent intelligence reports, supporters of the You-Know-Who are especially aggressive in their recruitment among young and disenfranchised wizards and witches. With the Ministry of Magic either in denial or simply powerless to resist the upsurge, many fear that this new resurgence of dark forces is more organized and widespread than previously believed. "It's clear they're capitalizing on fear and frustration," commented a senior Auror who preferred to remain anonymous. "They make an appealing case to those who feel neglected by the system." Reports indicate that recruitment drives are taking place not only in Britain but across the European continent. "They're using promises of power and influence to lure the disenchanted," the Auror added. The Ministry of Magic, meanwhile, issued a brief statement reminding the public to report any suspicious activity and affirming its commitment to protect all citizens from threats. "We urge the community to stand strong and united against any attempts to sow discord and division," it read. So far, efforts to curb recruitment have met with mixed results. "People are afraid, and when people are afraid, rational thought tends to take a backseat, " said Cassandra Matthis, a renowned expert in magical sociology. She stresses education as "the most powerful tool we have in fighting this insidious threat. Everyone must know what's at stake and what's being promised if we are to counteract the lies." With tensions high and little clarity from those in power, everyday witches and wizards are left wondering what their future holds as the shadow of the Dark Lord looms larger. Pergunta 1 2 / 2 pts A função filter(lambda x: x%3 !=0, numeros), aplicada à lista numeros = [n for n in range(1, 16)], retornará uma lista apenas com os números não divisíveis por 3, no intervalo fechado entre 1 e 15, uma vez que ela elimina os elementos para os quais a condição x%3 => 0 será avaliada como True. Falso Verdadeiro Pergunta 2 1 / 2 pts Marque as opções que geram corretamente uma lista com os anos bissextos entre 1900 e 2020. bissextos = list(filter(lambda ano: (ano % 400 == 0) or (ano % 4 == 0 and ano % 100 != 0), range(1900, 2021, 4))) bissextos = list(range(1900, 2021, 4)) Essa alternativa vai gerar todos os valores múltiplos de 4 no intervalo entre 1900 e 2020, sem verificar se são ou não bissextos. O ano 1900, por exemplo, não foi um ano bissexto. bissextos = [ano for ano in range(1900, 2021, 4) if (ano % 400 == 0) or (ano % 4 == 0 and ano % 100 != 0)] Pergunta 3 Com a função zip() é possível combinar elementos de um dicionário com elementos de uma lista. Exemplo: dic = {'MG':'Minas Gerais', 'SP':'São Paulo', 'AC':'Acre', 'AM':'Amazonas'} regioes = ['SE', 'SE', 'N', 'N'] estados = list(zip(dic.values(), dic.keys(), regioes)) Verdadeiro Falso Pergunta 4 A função reduce() possui esse nome pelo fato de reduzir uma lista com n elementos para apenas 1 único elemento da lista. Verdadeiro A função reduce() reduz uma lista a um único valor agregado (por exemplo, a soma de todos os números), mas ela não interfere na ordenação e nem na quantidade de elementos. Falso Pergunta 5 Comprehension em Python é uma forma concisa e sofisticada de gerar listas, onde podemos gerar uma lista iterando por outra lista ou por uma faixa de valores e ainda testar se cada elemento satisfaz uma determinada condição. O exemplo abaixo vai gerar uma lista dos anos bissextos entre os anos 1900 e 2020. A lista gerada está correta? bissextos = [ano for ano in range(1900, 201, 4) if (ano % 400 == 0) or (ano % 4 == 0 and ano % 100 != 0)] Verdadeiro O exemplo gera todos os anos múltiplos de 4 no intervalo entre 1900 e 2020, e testa se cada um desses anos gerados é bissexto, verificando se ele é divisível por 400 ou divisível por 4 mas não por 100. Falso
Send your question to AI and receive an answer instantly
Recommended for you
8
Simulado Compiladores Estacio
Programação
UMG
7
Atividade Objetiva 02 - Introdução a Linguangem Python
Programação
UMG
7
Atividade Objetiva 02 - Introdução a Linguangem Python
Programação
UMG
11
Prova Online - Introdução a Linguangem Python
Programação
UMG
4
Introdução a Programação
Programação
UMG
7
Atividade Objetiva 02 - Introdução a Linguangem Python
Programação
UMG
7
Atividade Objetiva 02 - Introdução a Linguangem Python
Programação
UMG
8
Atividade Objetiva 01 - Introdução a Linguangem Python
Programação
UMG
8
Atividade Pratica1
Programação
UNOPAR
9
Atividade Pratica
Programação
UNOPAR
Preview text
DEATH EATERS RECRUIT HEAVILY AMONG THE DISAFFECTED Brittany Spiegel October 4, 1995 LONDON--As violence continues to spread throughout the region, the wizarding community increasingly confronts an ugly truth: the Dark Lord's ranks are swelling. According to recent intelligence reports, supporters of the You-Know-Who are especially aggressive in their recruitment among young and disenfranchised wizards and witches. With the Ministry of Magic either in denial or simply powerless to resist the upsurge, many fear that this new resurgence of dark forces is more organized and widespread than previously believed. "It's clear they're capitalizing on fear and frustration," commented a senior Auror who preferred to remain anonymous. "They make an appealing case to those who feel neglected by the system." Reports indicate that recruitment drives are taking place not only in Britain but across the European continent. "They're using promises of power and influence to lure the disenchanted," the Auror added. The Ministry of Magic, meanwhile, issued a brief statement reminding the public to report any suspicious activity and affirming its commitment to protect all citizens from threats. "We urge the community to stand strong and united against any attempts to sow discord and division," it read. So far, efforts to curb recruitment have met with mixed results. "People are afraid, and when people are afraid, rational thought tends to take a backseat, " said Cassandra Matthis, a renowned expert in magical sociology. She stresses education as "the most powerful tool we have in fighting this insidious threat. Everyone must know what's at stake and what's being promised if we are to counteract the lies." With tensions high and little clarity from those in power, everyday witches and wizards are left wondering what their future holds as the shadow of the Dark Lord looms larger. Pergunta 1 2 / 2 pts A função filter(lambda x: x%3 !=0, numeros), aplicada à lista numeros = [n for n in range(1, 16)], retornará uma lista apenas com os números não divisíveis por 3, no intervalo fechado entre 1 e 15, uma vez que ela elimina os elementos para os quais a condição x%3 => 0 será avaliada como True. Falso Verdadeiro Pergunta 2 1 / 2 pts Marque as opções que geram corretamente uma lista com os anos bissextos entre 1900 e 2020. bissextos = list(filter(lambda ano: (ano % 400 == 0) or (ano % 4 == 0 and ano % 100 != 0), range(1900, 2021, 4))) bissextos = list(range(1900, 2021, 4)) Essa alternativa vai gerar todos os valores múltiplos de 4 no intervalo entre 1900 e 2020, sem verificar se são ou não bissextos. O ano 1900, por exemplo, não foi um ano bissexto. bissextos = [ano for ano in range(1900, 2021, 4) if (ano % 400 == 0) or (ano % 4 == 0 and ano % 100 != 0)] Pergunta 3 Com a função zip() é possível combinar elementos de um dicionário com elementos de uma lista. Exemplo: dic = {'MG':'Minas Gerais', 'SP':'São Paulo', 'AC':'Acre', 'AM':'Amazonas'} regioes = ['SE', 'SE', 'N', 'N'] estados = list(zip(dic.values(), dic.keys(), regioes)) Verdadeiro Falso Pergunta 4 A função reduce() possui esse nome pelo fato de reduzir uma lista com n elementos para apenas 1 único elemento da lista. Verdadeiro A função reduce() reduz uma lista a um único valor agregado (por exemplo, a soma de todos os números), mas ela não interfere na ordenação e nem na quantidade de elementos. Falso Pergunta 5 Comprehension em Python é uma forma concisa e sofisticada de gerar listas, onde podemos gerar uma lista iterando por outra lista ou por uma faixa de valores e ainda testar se cada elemento satisfaz uma determinada condição. O exemplo abaixo vai gerar uma lista dos anos bissextos entre os anos 1900 e 2020. A lista gerada está correta? bissextos = [ano for ano in range(1900, 201, 4) if (ano % 400 == 0) or (ano % 4 == 0 and ano % 100 != 0)] Verdadeiro O exemplo gera todos os anos múltiplos de 4 no intervalo entre 1900 e 2020, e testa se cada um desses anos gerados é bissexto, verificando se ele é divisível por 400 ou divisível por 4 mas não por 100. Falso