Pular para o conteúdo principal

Questão de Programação — Python — CESGRANRIO 2024

ProgramaçãoPython
Código
cg020782
Banca
CESGRANRIO
Órgão
BNDES
Ano
2024
Nível
Superior
Cargo
Analista - Análise de Sistemas - Desenvolvimento (Manhã)
Considere o seguinte código Python 3:x = { 'f' : 1, 'g' : 2, 'h' : 1, 'i' : 2, 'j' : 3 }x = list ( x. values () )x = set (x)x = sorted (x)print (x)Qual será o valor impresso pelo código?
  1. A[ ' f ' , ' g ' , ' h ' , ' i ' , ' j ' ]
  2. B[ ' 1 ' , ' 1 ' , ' 2 ' , ' 2 ' , ' 3 ' ]
  3. C[ ' f ' , ' g ' , ' h ' ]
  4. D[ 1 , 2 , 1 , 2 , 3 ]
  5. E[ 1 , 2 , 3 ]
Revelar gabarito e comentário

GabaritoE — [ 1 , 2 , 3 ]

Link permanente: /questoes/cg020782