 Decipher List of Binary Numbers
Decipher List of Binary Numbers
Congratulations! You are one step closer to being a computer master 😎 Imagine that you can convert even a sequence to a binary code. By the way, if you have a desire to cipher your phone number or date of birth then try it! The more practice, the better!
Swipe to start coding
Here you are going to convert the sequence to a binary representation. The task is still the same 😜 Follow the instructions and fill the gaps. The code leads you to get acquainted with another fascinating sequence, as you remember the explanation is waiting for you at the end of the chapter, be patient.
- Create an empty list for storing decimal numbers.
- Print the list of binary numbers.
- Define the loop that iterates through the binary_list.
- Define the loop that executes till the binary_numberis0.
- Count the remainder of division binary_numberby10and assign it to the variablelast digit.
- Multiply the last_digitby2raised to the relevant power.
- Add the resultto thedecimal_number.
- Decrease the binary_number10times using integer division.
- Increase powerby1.
- Append the decimal_numberto the list of decimal numbers.
- Print the list of decimal numbers.
Lösning
Note
You received a few numbers from the sequence called "Happy numbers". Have you wondered that such continuity exists?
Tack för dina kommentarer!
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal
Sammanfatta detta kapitel
Explain code
Explain why doesn't solve task
Awesome!
Completion rate improved to 7.14 Decipher List of Binary Numbers
Decipher List of Binary Numbers
Svep för att visa menyn
Congratulations! You are one step closer to being a computer master 😎 Imagine that you can convert even a sequence to a binary code. By the way, if you have a desire to cipher your phone number or date of birth then try it! The more practice, the better!
Swipe to start coding
Here you are going to convert the sequence to a binary representation. The task is still the same 😜 Follow the instructions and fill the gaps. The code leads you to get acquainted with another fascinating sequence, as you remember the explanation is waiting for you at the end of the chapter, be patient.
- Create an empty list for storing decimal numbers.
- Print the list of binary numbers.
- Define the loop that iterates through the binary_list.
- Define the loop that executes till the binary_numberis0.
- Count the remainder of division binary_numberby10and assign it to the variablelast digit.
- Multiply the last_digitby2raised to the relevant power.
- Add the resultto thedecimal_number.
- Decrease the binary_number10times using integer division.
- Increase powerby1.
- Append the decimal_numberto the list of decimal numbers.
- Print the list of decimal numbers.
Lösning
Note
You received a few numbers from the sequence called "Happy numbers". Have you wondered that such continuity exists?
Tack för dina kommentarer!
single