Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Mais um Desafio de Cifragem | Sistema Numérico Hexadecimal
Sistemas de Numeração 101
course content

Conteúdo do Curso

Sistemas de Numeração 101

Sistemas de Numeração 101

1. Sistema Numérico Binário
2. Sistema Numérico Octal
3. Sistema Numérico Hexadecimal
4. Revelação

Mais um Desafio de Cifragem

Aprecio muito os seus esforços! Aqui você vai se aprofundar em ciframento e o último desafio para você é converter um número do sistema numeral decimal para um sistema hexadecimal. Tente fazer isso usando strings😉.

  1. Você precisa dividir o número por 16 e anotar o resto da divisão.
  2. Se o número for maior que 9, você precisa encontrar uma correspondência em letras.
  3. Então você deve calcular o número recebido e aplicar o primeiro passo a ele.
  4. Você pode parar se o resultado da divisão for 0.
  5. Reescreva os restos na ordem inversa.
1234567891011121314151617181920212223
# Implementing dictionary, but here the keys are numbers, because we are ciphering dictionary = {0: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", 10:"A" , 11:"B", 12:"C", 13:"D", 14:"E", 15:"F"} # Defining the decimal number 64206 decimal_number = 64206 # The text should be realised here due to the reason that further the decimal number will be changed print("The number in decimal numeral system is:", decimal_number) # Creating a list for storing converted hex number hexadecimal_number = [] # The conformity for 0 in decimal numeration system is 0; hence, this condition implemented # The loop executes till the number is zero while decimal_number != 0: # Counting the remainder of division by 16 remainder = decimal_number % 16 # Appending the converted resulting number for creating hexadecimal number hexadecimal_number.append(str(dictionary[remainder])) # This operation allows to decrease number by 16 an work with integer part of new one decimal_number = decimal_number // 16 # Reversing the string hexadecimal_number = hexadecimal_number[::-1] # Concatenating elements hexadecimal_number = "".join(hexadecimal_number) # Printing the result print("The number in hexadecimal numeral system is:", hexadecimal_number)
copy

Tarefa

Hora de aprimorar suas habilidades! Siga o algoritmo e preencha as lacunas para receber um número em representação hexadecimal:

  1. Imprima a variável decimal_number.
  2. Crie uma lista vazia para armazenar o hexadecimal_number.
  3. Defina o loop que executa até que o decimal_number seja 0.
  4. Conte o remainder da divisão do decimal_number por 16.
  5. Faça a string hexadecimal_number invertida.
  6. Junte todos os elementos da string hexadecimal_number.

Tarefa

Hora de aprimorar suas habilidades! Siga o algoritmo e preencha as lacunas para receber um número em representação hexadecimal:

  1. Imprima a variável decimal_number.
  2. Crie uma lista vazia para armazenar o hexadecimal_number.
  3. Defina o loop que executa até que o decimal_number seja 0.
  4. Conte o remainder da divisão do decimal_number por 16.
  5. Faça a string hexadecimal_number invertida.
  6. Junte todos os elementos da string hexadecimal_number.
Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Seção 3. Capítulo 2
toggle bottom row

Mais um Desafio de Cifragem

Aprecio muito os seus esforços! Aqui você vai se aprofundar em ciframento e o último desafio para você é converter um número do sistema numeral decimal para um sistema hexadecimal. Tente fazer isso usando strings😉.

  1. Você precisa dividir o número por 16 e anotar o resto da divisão.
  2. Se o número for maior que 9, você precisa encontrar uma correspondência em letras.
  3. Então você deve calcular o número recebido e aplicar o primeiro passo a ele.
  4. Você pode parar se o resultado da divisão for 0.
  5. Reescreva os restos na ordem inversa.
1234567891011121314151617181920212223
# Implementing dictionary, but here the keys are numbers, because we are ciphering dictionary = {0: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", 10:"A" , 11:"B", 12:"C", 13:"D", 14:"E", 15:"F"} # Defining the decimal number 64206 decimal_number = 64206 # The text should be realised here due to the reason that further the decimal number will be changed print("The number in decimal numeral system is:", decimal_number) # Creating a list for storing converted hex number hexadecimal_number = [] # The conformity for 0 in decimal numeration system is 0; hence, this condition implemented # The loop executes till the number is zero while decimal_number != 0: # Counting the remainder of division by 16 remainder = decimal_number % 16 # Appending the converted resulting number for creating hexadecimal number hexadecimal_number.append(str(dictionary[remainder])) # This operation allows to decrease number by 16 an work with integer part of new one decimal_number = decimal_number // 16 # Reversing the string hexadecimal_number = hexadecimal_number[::-1] # Concatenating elements hexadecimal_number = "".join(hexadecimal_number) # Printing the result print("The number in hexadecimal numeral system is:", hexadecimal_number)
copy

Tarefa

Hora de aprimorar suas habilidades! Siga o algoritmo e preencha as lacunas para receber um número em representação hexadecimal:

  1. Imprima a variável decimal_number.
  2. Crie uma lista vazia para armazenar o hexadecimal_number.
  3. Defina o loop que executa até que o decimal_number seja 0.
  4. Conte o remainder da divisão do decimal_number por 16.
  5. Faça a string hexadecimal_number invertida.
  6. Junte todos os elementos da string hexadecimal_number.

Tarefa

Hora de aprimorar suas habilidades! Siga o algoritmo e preencha as lacunas para receber um número em representação hexadecimal:

  1. Imprima a variável decimal_number.
  2. Crie uma lista vazia para armazenar o hexadecimal_number.
  3. Defina o loop que executa até que o decimal_number seja 0.
  4. Conte o remainder da divisão do decimal_number por 16.
  5. Faça a string hexadecimal_number invertida.
  6. Junte todos os elementos da string hexadecimal_number.
Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Seção 3. Capítulo 2
toggle bottom row

Mais um Desafio de Cifragem

Aprecio muito os seus esforços! Aqui você vai se aprofundar em ciframento e o último desafio para você é converter um número do sistema numeral decimal para um sistema hexadecimal. Tente fazer isso usando strings😉.

  1. Você precisa dividir o número por 16 e anotar o resto da divisão.
  2. Se o número for maior que 9, você precisa encontrar uma correspondência em letras.
  3. Então você deve calcular o número recebido e aplicar o primeiro passo a ele.
  4. Você pode parar se o resultado da divisão for 0.
  5. Reescreva os restos na ordem inversa.
1234567891011121314151617181920212223
# Implementing dictionary, but here the keys are numbers, because we are ciphering dictionary = {0: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", 10:"A" , 11:"B", 12:"C", 13:"D", 14:"E", 15:"F"} # Defining the decimal number 64206 decimal_number = 64206 # The text should be realised here due to the reason that further the decimal number will be changed print("The number in decimal numeral system is:", decimal_number) # Creating a list for storing converted hex number hexadecimal_number = [] # The conformity for 0 in decimal numeration system is 0; hence, this condition implemented # The loop executes till the number is zero while decimal_number != 0: # Counting the remainder of division by 16 remainder = decimal_number % 16 # Appending the converted resulting number for creating hexadecimal number hexadecimal_number.append(str(dictionary[remainder])) # This operation allows to decrease number by 16 an work with integer part of new one decimal_number = decimal_number // 16 # Reversing the string hexadecimal_number = hexadecimal_number[::-1] # Concatenating elements hexadecimal_number = "".join(hexadecimal_number) # Printing the result print("The number in hexadecimal numeral system is:", hexadecimal_number)
copy

Tarefa

Hora de aprimorar suas habilidades! Siga o algoritmo e preencha as lacunas para receber um número em representação hexadecimal:

  1. Imprima a variável decimal_number.
  2. Crie uma lista vazia para armazenar o hexadecimal_number.
  3. Defina o loop que executa até que o decimal_number seja 0.
  4. Conte o remainder da divisão do decimal_number por 16.
  5. Faça a string hexadecimal_number invertida.
  6. Junte todos os elementos da string hexadecimal_number.

Tarefa

Hora de aprimorar suas habilidades! Siga o algoritmo e preencha as lacunas para receber um número em representação hexadecimal:

  1. Imprima a variável decimal_number.
  2. Crie uma lista vazia para armazenar o hexadecimal_number.
  3. Defina o loop que executa até que o decimal_number seja 0.
  4. Conte o remainder da divisão do decimal_number por 16.
  5. Faça a string hexadecimal_number invertida.
  6. Junte todos os elementos da string hexadecimal_number.
Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Aprecio muito os seus esforços! Aqui você vai se aprofundar em ciframento e o último desafio para você é converter um número do sistema numeral decimal para um sistema hexadecimal. Tente fazer isso usando strings😉.

  1. Você precisa dividir o número por 16 e anotar o resto da divisão.
  2. Se o número for maior que 9, você precisa encontrar uma correspondência em letras.
  3. Então você deve calcular o número recebido e aplicar o primeiro passo a ele.
  4. Você pode parar se o resultado da divisão for 0.
  5. Reescreva os restos na ordem inversa.
1234567891011121314151617181920212223
# Implementing dictionary, but here the keys are numbers, because we are ciphering dictionary = {0: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", 10:"A" , 11:"B", 12:"C", 13:"D", 14:"E", 15:"F"} # Defining the decimal number 64206 decimal_number = 64206 # The text should be realised here due to the reason that further the decimal number will be changed print("The number in decimal numeral system is:", decimal_number) # Creating a list for storing converted hex number hexadecimal_number = [] # The conformity for 0 in decimal numeration system is 0; hence, this condition implemented # The loop executes till the number is zero while decimal_number != 0: # Counting the remainder of division by 16 remainder = decimal_number % 16 # Appending the converted resulting number for creating hexadecimal number hexadecimal_number.append(str(dictionary[remainder])) # This operation allows to decrease number by 16 an work with integer part of new one decimal_number = decimal_number // 16 # Reversing the string hexadecimal_number = hexadecimal_number[::-1] # Concatenating elements hexadecimal_number = "".join(hexadecimal_number) # Printing the result print("The number in hexadecimal numeral system is:", hexadecimal_number)
copy

Tarefa

Hora de aprimorar suas habilidades! Siga o algoritmo e preencha as lacunas para receber um número em representação hexadecimal:

  1. Imprima a variável decimal_number.
  2. Crie uma lista vazia para armazenar o hexadecimal_number.
  3. Defina o loop que executa até que o decimal_number seja 0.
  4. Conte o remainder da divisão do decimal_number por 16.
  5. Faça a string hexadecimal_number invertida.
  6. Junte todos os elementos da string hexadecimal_number.
Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 3. Capítulo 2
Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt