8.3.9 Text to Binary Python

8.3.9 Text To Binary Python

Answers

Answer 1

Using the knowledge in computational language in python it is possible to write a code that write the binary code

Writting the code:

#function that will convert the text to binary

def text_to_binary(text):

   #variable to store the converted binary value

   binary_text = ""

   #iterate for each character in the text

   for i in text:

       #get the ASCII value of that character

       ascii = ord(i)

       #call the function to get the value of the

       #current ascii number and append it to the

       #binary_text

       binary_text += decimal_to_binary(ascii)

   #return the final converted binary value

   return binary_text

def decimal_to_binary(decimal_value):

   binary_base = 2

   num_bits_desired = 8

   binary_value = str(bin(decimal_value))[2:]

   while len(binary_value) < num_bits_desired:

       binary_value = "0" + binary_value

   return binary_value

text = input("Input the string you would like to encode: ")

binary = text_to_binary(text)

print(binary)

See more about python at brainly.com/question/18502436

#SPJ1

8.3.9 Text To Binary Python

Related Questions

When you go to Starbucks, you note that your IP address is 192.168.104.2, and that your netmask is 255.255.240.0. . How many bits are in the host portion of this subnet

Answers

Answer:

The correct answer is 4 bits.

Explanation:

First we must identify what class it belongs to and we see the first octet on the left side of the IP address, which is 192 and we can determine that it is a Class C address, therefore its mask is:

Default mask 255.255.255.0 => 24 bits.

IP mask 255.255.255.240 => 28 bits.

We can conclude that I borrow 4 bits to calculate subnets.

We can conclude the following:

[tex]2^{n} --> 2^{4} -->[/tex]16 subnets maximum.

.A card that connects directly to the motherboard of the computer and has external sockets so that the computer can be connected to a network via cables is called

Answers

Answer: Network interface controller

Explanation:

A network interface controller is also referred to as the network adapter or LAN adapter. It is simply a component of the computer hardware that is used to connects a computer system to a particular network.

It is a card that connects directly to the motherboard of the computer and has external sockets so that the computer can be connected to a network via cables.

fill in the blanks y'all-

-------- is a pictorial representation of a step-by-step algorithm

I will give brainliest, just answer quick :) ​
k I don't need it anymore

Answers

Answer:

Flowchart

Explanation:

Flowchart is a pictorial representation of a step-by-step algorithm.

It comprises of the various steps involved in a process which are usually well arranged in an orderly and sequential manner.

It is also referred to how algorithms are diagrammatical put up for better analysis .

Why would we need to consider implementing our business blockchain application not on Bitcoin but Ethereum?

Answers

True or False
1. Phishing is the act of sending multiple emails to multiple users in hope of having
2. Spoofing is the act of obtaining unauthorized access to data from a computer
network.
3. Extortion is the act of using the internet to threaten or damage someone's
reputation to extort money or anything else of value.
4. In late 2014, LimeWire was raided for the second time due to years of pirating
movies, music, games, books and other software.
5. Electronic harassment is also referred to as cyberbullying.
6. Non-delivery of service is the act of devising a scheme wherein a culprit posts an
item or service for sale over the internet, and once the transactions have been done, does not
give the item or service.
7. Encryption is the process of converting raw to data code.
8. In piracy, trackers are used to identify IP addresses currently sharing a pirated
file.
9. Wager Gambling is the act of betting on any sports event over the internet.
10. Most email services today have spam or bulk folder that automatically puts
these suspicious emails to that folder.

The function changeLocation is also called a _____.

class bike:
def __init__(self,size,idNum,color ):
self.size = size
self.location = 10
self.color = color
self.idNum = idNum

def changeLocation(self,newLocation):
self.location = newLocation


manipulator

initiator

method

constructor

Answers

Answer:

The answer is a method

Explanation:

Answer:

class and self

Explanation:

class Bike:

def __init__(self, str, float):

self.color = str

self.price = float

Write a function that returns the info of the kth element of the linked list. If no such element exists terminate the program. (getKThElement)

Answers

Answer:

Explanation:

The following code is written in Java and creates a function that takes a LinkedList as a parameter then the function asks the user for which position element they would like to retrieve, loops through the LinkedList, and returns the info on that element position. If that position is not found then the program ends. Position variable is subtracted by 1 in the loop since elements start at 0 in data structures.

 public static void searchForElement(LinkedList<String> myArr) {

       Scanner input = new Scanner(System.in);

       System.out.println("What position do you want to search for?");

       int position = input.nextInt();

       for (int x = 0; x < myArr.size(); x++) {

           if (position > myArr.size()) {

               break;

           }

           if (x == position - 1) {

               System.out.println(myArr.get(x));

           }

       }

   }

"Write an SQL query that displays the Ssn and Last name of all employees who is a supervisor of a Department Manager"

Answers

Answer:

SELECT Ssn,

             Last_name

 FROM employees

WHERE position = supervisor;

Explanation:

SELECT is an SQL query statement that is used to initiate the display of wanted variables.

The names of the variables often succeed the SELECT statement and they are separated by commas.

FROM is an SQL query statement that indicates the table fro which the selected variables be displayed.

WHERE is used to filter your search and return only rows that meet the criteria.

; signifies the end of a query and calls for an execution.

ark titanoboa taming

Answers

Huh???????................

it is a passive tame throw the an egg down and it will eat it if it attacks you or gets attacked it will reset the taming process

Explanation:

Importance of individual differences in difference in work potential with examples

Answers

Individual differences are how people differ from one another. Each individual in an organization has their own style of behavior. Individual differences are crucial for supervisors to comprehend because they influence employees' feelings, thoughts, and behavior.

What is work potential?

The innate ability of every person to live and perform in alignment with their highest self is referred to as work potential.

Overall, studying individual differences helps us understand not only what makes humans similar, but also what makes them different.

We can best understand the full range of human behavior by taking into account the variations that can occur from one person to the next.

Thus, individual differences in difference in work potential is crucial.

For more details regarding work potential, visit:

https://brainly.com/question/24947234

#SPJ1

You should not be more than 5 minutes early to your interview because it makes you look desperate to get the job. A. True B. False

Answers

Answer: I believe this is false. When you arrive early for an interview, you give the impression that you are a responsible and punctual person, and that you take other people's time with respect.

Answer:

B

Explanation:

A business that helps people find jobs for a fee

Answers

career coaches is a business that help people to find job for free

Help meee pleaseeee

Answers

Answer:

1. DO, RECEIVE

2. PERFORM

3. STORE, TAKE IN, CALCULATE

4. EXPRESS

5. COMPUTE, DISPLAY

Explanation:

1. A computer DO or RECEIVE data

2. Modern automatic digital computers PERFORM more than 100 mln operations in each second

3. A computer STORE information or data, TAKE IN a sequence of operations on information and CALCULATE answers.

4. The hardware inside the computer EXPRESS arithmetical operations or logical relations

5. When the computers COMPUTE results, they DISPLAY them.

1. DO, RECEIVE

2. PERFORM

3. STORE, TAKE IN, CALCULATE

4. EXPRESS

5. COMPUTE, DISPLAY

How would you maximize the use of a class?

Answers

Answer:

can't understand your qs.......

1. An output device sends data to a computer.

(YALL PLEASE I NEED HELP I GOT AN F ON THIS, I HAVE 1 MORE CHANCE)

Answers

Answer: False. Input device does not receive data either.

Explanation:

Which hard drive type would be best to use by the army when writing operational data while traveling in a jeep in rough terrain?

Answers

Answer:

They should use an SSD.

Explanation:

The fact that the writing operation takes place in a jeep in rough terrain suggests that they should be using an SSD (Solid State Drive) which unlike HDD's, don't have a spinning disk and a head that writes data on it. So there are no moving parts in an SSD,  and they have about 30 times more resistance to shock/vibration damage which is really helpful in this situation.

I hope this answer helps.

Steve is creating a document with proper nouns, which Word continues to identify as being misspelled.

Which of these steps should he do in this situation?

Skip the Spell Checker.
Right-click the noun and choose Ignore All.
Right-click and Add to dictionary.
B and C are correct.

Answers

B and c are correct answer

You wrote a program to allow the user to guess a number. Complete the code to generate a random integer from one to 10.
from random import *

# Generate and save a random number.
correct =
(1,10)
NEED HELP FAST

Answers

The code to generate a random number from 1 to 10 is as follows:

import random

print(random.randint(1,10))

The code is written in python.

Code explanation:The first line of code is used to import a module name "random". The random module is use to generate the random numbers.The second line of code, we use the object in random to generate integers from 1 to 10. The print statement is then used to print the random numbers from 1 to 10. Running the code we generate random numbers between 1 to 10 as required.

learn more on python code here: https://brainly.com/question/26104476?referrer=searchResults

Answer:

randint

Explanation:

Got it correct on edge


What is a program? - define and explain

Answers

Answer:

a series of coded software instructions to control the operation of a computer or other machine.

Explanation:

a set of instructions that process input, manipulate data, and output a result. For example, Microsoft Word is a word processing program that allows users to create and write documents.

To solve the difficulty of scaling memory organization, memories are physically organized into a ____-dimensional organization.
A) one
B) two
C) three
D) multi

Answers

Answer: two

Explanation:

Organizational memory is simply referred to as the accumulation of data or information that have been created for a particular organization.

To solve the difficulty of scaling memory organization, memories are physically organized into a two dimensional organization.

Write a recursive method that takes four inputs: a 1-D array of Strings (i.e., exams), the length of this 1-D array (i.e., n), an index to access array elements (i.e., i) and a 2-D array containing double values (i.e., ret).

Answers

Answer:

import java.util.*;

public class Main

{

       public static void main(String[] args)  

       {

           String [] exams = {"1;2;3;4;" , "5;6;7;8;" , "9;10;11;12;" };

           double[][] n = new double[exams.length][4];

           examArray = convert(exams , exams.length , 0 , n);

           for(int i = 0 ; i < exams.length ; i++)

           {

               for(int j = 0 ; j < 4 ; j++)

               {

                   System.out.print(n[i][j] + "\t");

               }

              System.out.print("\n");

           }

       }    

       

/* recursive function convert defined here */

       public static double[][] convert(String[] exams , int number , int x , double [][] result)

       {

           if(x==number)

               return result;

           else

           {

               String total = exams[x];  

               String currentScore = "";

               int p = 0;

               for(int j = 0 ; j<totalScore.length() ; j++)

               {

                   char ch = total.charAt(j);/

                   if(ch==';')

                   {

                       result[x][p] = Double.parseDouble(currentScore);

                       p++;

                       currentScore = "";

                   }

                   else

                   {

                       currentScore = currentScore + Character.toString(ch);

                   }

               }

               return convert(exams , number , x+1 , result);

           }

           

       }

}

Explanation:

The Java source code defines a recursive function or method called convert that converts the results of three students that sat for four examinations to double or float number and screens their individual results for the four exams on the screen.

The Ntds. dit file is a database that stores Active Directory data, including information about user objects, groups, and group membership. It includes the password hashes for all users in the domain.
Just take the points.

Answers

Answer:

I hate it

Explanation:

Mark it as the brainliest if u love god

Squared Age as Year - A person born in 1980 can claim "I will be x years old in the year x squared." Write a python program to calculate how old a person born in 1980 will be when the value of their age (x) squared is equal to the year they are x years old on their birthday.

Answers

Answer:

40

Explanation:

its simple math

84 the the rout of 54

is anyone a robIox creator?
me and some of my friends are going to work on a robIox game and we need someone to help us build and script it.
anyone wanna help?

Answers

Well, I am now getting into making Robl. games, so I would be able to help.

But the only downside is that my computer isn't working at the moment and may take a while to fix. But i'm sure when i am done with it, I could help.

3. Sum of Numbers Assume that a file containing a series of integers is named numbers . dat and exists on the computer's disk. Design a program that reads all of the numbers stored in the file and calculates their total.

Answers

Answer:

The program written in Python is as follows:

file_handler = open("numbers.dat","r")

nums = 0

for line in file_handler:

     try:

           nums+=int(line)

     except ValueError:

           continue

file_handler.close()

print("Sum: "+str(nums))

Explanation:

The file handler is used to enable the program reads content of the file numbers.dat

file_handler = open("numbers.dat","r")

This initializes the sum of numbers to 0

nums = 0

This iterates through the line of the file

for line in file_handler:

The try exception is used to prevent program crash if data other than integer is read

     try:

This adds numbers on each line

           nums+=int(line)

This exception is returned for data other than integers

     except ValueError:

           continue

This closes the file handler

file_handler.close()

This prints the calculated sum

print("Sum: "+str(nums))

Which form of data does the image represent? (10 points)

A. Analog data
B. Digital data

Answers

Where is the image?, I cant answer if there is no image
b
.......…..................

Using E-commerce , how you can make Secure payments

Answers

Answer:

requesting a receipts for every payment

Explanation:

after making a payment you have to request a receipt it might be printable or electronic

Hardcoding numbers (unnamed, literal constants) in code without explanation is a bad programming practice. What are these hardcoded numbers known as

Answers

Answer:

Magic numbers.

Explanation:

In Computer programming, hardcoding can be defined as a software development process which typically involves directly embedding or infusing data into the source code of a computer software application or program rather than generating the data at runtime or sourcing (obtaining) it from an external source.

Hence, hardcoding numbers (unnamed, literal constants) in code without explanation is a bad programming practice. These hardcoded numbers are known as magic numbers.

A magic number refers to a hard-coded value embedded into the source code of a software program without explanation and as such are very difficult to update.

Natasha's laptop has long-term storage that uses a magnetic arm to move over a platter to read and write data. It is cheaper than other storage options and has a high capacity of storage, but because of its moving parts, it is not as durable than other options and runs very loudly. What type of long-term storage does her computer have?

A.
read-only memory (ROM)

B.
hard disk drive (HDD)

C.
random access memory (RAM)

D.
solid-state drive (SSD)

Answers

SSD

Explanation:

But I prefer SSD rather than HDD , because there are soo many benifits of SSD like very fast read and write speed , small in size , it did not corrupt your data easily , did not get damage by any physical impact . SSD is like bigger version of smartphone’s sd card. Only one thing is that SSD is too most costly than HDD

Ssd is your answer you’re welcome

Cassette tape is an example of ____ memory

Answers

Answer:

Cassette tape is an example of computer memory.

Of the computers memory duhhhh

Overflow and roundoff errors result from real-world limitations in representing . . . (10 points)
A. number systems
B. fractions
C. place values

Answers

Answer:

C. place values

Explanation:

Place value can be defined as the numerical value representing a digit owing to its position in a number. Some examples of the various place values used in representing each digit are tenths, hundredths, thousandths, unit, tens, hundreds, thousands etc.

For example, in the number 316.2;

The place value of 3 is hundreds. The place value of 1 is tens. The place value of 6 is units. The place value of 2 is tenths.

In the real-world, their instances where there are limitations in counting and representing real numbers that are infinite (too small or too large). In order to overcome these limitations or barriers, we use place values.

An overflow error arises when a real number cannot be represented because it is too large and exceeds the upper limits of a range chosen.

Also, a roundoff error can be defined as the difference between the output generated from an algorithm using an exact or actual numbers and the output generated using rounded or finite-precision numbers.

Hence, overflow and roundoff errors result from real-world limitations in representing place values.

Other Questions
Augusto is a farmer who encounters several bones while plowing his field and wants to know if the bones are human. Which type of anthropologist should he call?. A 3 kg mass is travelling in a circle of 0.1 m radius with a speed of 2 m/s. What is the centripetal acceleration? True or false. Acoas will rent to void conflict whenever possible even if it means giving in More Native Americans fought on the side of the British than with the Americans during the American Revolution. true or false PLEASE HELP ILL MARK BRAINLIEST What is a formula unit in an iconic bond A few brown beetles left their population (the first population) and migrated to a population of green beetles (the second population). Which of the following occurs as a result? What is the correct order of the creative process from start to finish when making art? A group of adults and students buy tickets for a dance performance.*Each ticket costs $5.35*The total cost of the tickets for the group is $69.55*There are exactly 3 adults in the group.What is the number of students in the group?Explain your steps on how you solved this problem. i will give brainlest how do you solve this equation step-by-step? (below)4a + 8 - 2a - 3 = 45 MY ELEMENT IS RHENIUM1. Summarize the physical and chemical properties of the element you selected.2. In the lesson, many models were used to depict the atom. How did these models help you understand atomic structure?3. How do protons, neutrons, and electrons differ in terms of their electrical charges and locations within the atom?4. Describe the four fundamental forces. Which of these forces are involved in chemical bonding?Please answer these questions or at least one. PLEASE HELP SOON. NO ONE IS ANSWEING ANY OF MY QUESTIONS. high mass stars include what ? What did Attila the Hun do when he saw the Walls of Constantinople? PLEASE HELP I WILL GIVE BRAINLIEST For a game, a player takes a turn by spinning a spinner and rolling a number cube. The spinner has three equally sized sections colored red, yellow, and blue. The number cube has has sides numbered 1 through 6. The table shows all possible outcomes of a turn. Red, 1 Red, 2 Red, 3 Red, 4 Red, 5 Red, 6 Yellow, 1 Yellow, 2 Yellow, 3 Yellow, 4 Yellow, 5 Yellow, 6 Blue, 1 Blue, 2 Blue, 3 Blue, 4 Blue, 5 Blue, 6PART A.) What is the probability that the spinner lands on yellow.-1/9-1/6-1/31/2 PART B.) What is the probability that the spinner lands on yellow or the number cube lands on 4?-1/18-7/18-4/9-1/2 PLEASE HELP MEEEEEEEEEEEEEEEEEEEEEEThere are 360 people in a movie theater. Of these people, 35% bought student tickets, and 45% bought adult tickets. The rest bought senior-citizen tickets. how many people bought senior tickets? Select the best answer for the question.6. When exercising, you shouldKO A. avoid wasting time with a warm-up.O B. plan to take in extra protein.O C. work through any pain that you experience.O D. plan to take in extra water.Mark for review (Will be highlighted on the review page) Question 5 2 pts When properly kayaking in the water, your posture should be: (2 points) Sitting down with your weight balanced evenly from side to side Sitting down with your head and shoulders forward and a rounded back for stability Standing up with one foot slightly in front of the other for balance O Standing up with your feet side by side to keep a high center of gravity Plz help asap Use synthetic division to divide x + 3x - 4x - 10 by x - 2211The quotient is:The remainder is: 2253106-4>>Note: Enter only a number for the remainder, no fraction.122-10