1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
arlik [135]
3 years ago
5

Write a python function c that converts bitstring array back to an integer numpy array

Computers and Technology
1 answer:
tresset_1 [31]3 years ago
6 0

Answer:

import numpy as np#importing numpy module with an alias np.

def c(bitstring_array):# defining function c.

   num_integer=bitstring_array.dot(2**np.arange(bitstring_array.size)[::-1])#bitstring conversion.

   return num_integer#returning integer array.

print("Enter bits")

Bit_l=input().split(" ")#enter space separated bitstring.

for i in range(len(Bit_l)):#iterating over the bitstring.

   Bit_l[i]=int(Bit_l[i])

bitstring_array=np.array(Bit_l)

print(c(bitstring_array))#function call.

Output:

Enter bits

1 1 1 0 0 1

57

You might be interested in
How many times is the function wordScramble() called in the given program? public class WordScramble { public static void wordSc
Ainat [17]

Answer:

The answer is "2"

Explanation:

  • In the given java program code, a class WordScramble is declared, inside the class, a static method wordScramble is declared, that accepts two string parameter that is "rem and scr".
  • Inside the method a conditional statement is used in the if the block it checks rem variable value is empty so, it will add rem and scr value.  Otherwise, it will go to else block in this a loop is defined, which calls the method, which calculates rem length that is 2, and this method call two times to rearrange the values.
  • In the next step main method is defined that calls wordScramble method, which passes only one argument "ab" in its first parameter.
  • This method accepts one string value, in which there are two numbers   "a and b" that's why the method will run two times.  
6 0
3 years ago
Dallas is an analyst at an online retailer. He is great at creating representative diagrams showing the relationships between cu
dimulka [17.4K]

Answer:

The correct answer to the following question will be "Abstract Reasoning".

Explanation:

  • Abstract reasoning depends on the ability to interpret facts, to identify correlations and interactions and to resolve the problems at a deep, conceptual level.
  • To be able to construct hypotheses about both the existence of events and concepts require abstract reasoning capabilities.

This suggests, therefore, that Dallas has this ability.

4 0
3 years ago
ShellShock had the potential for an unauthorized user to gain access to a server. It affected many internet-facing services, whi
mina [271]

Answer: Windows

Explanation:

ShellShock: Also called Bashdoor, it is a security bug which is found in the Bash shell of operating system e.g. Unix. It allows the hacker to execute scripts and commands by gaining unauthorized access. This affects many machines, devices that use Bash. Servers like web servers are most affected as most of them run Unix based OS like OS X. Most vulnerable are those who use Unix or Linux operating systems.  

Microsoft Windows does not use Bash so it does not directly affect Windows os. For those who are using Windows PC, Windows phones and websites that are developed by MS software are non-vulnerable to ShellShock.

4 0
3 years ago
Edhesive 11.1 lesson practice please
zloy xaker [14]

Answer:

1. Bits

2. Bitrate

3. The amount of time it takes for bits to travel from one place to another.

4. Used to send bits wirelessly.

5. Cables that carry light and dramatically increase the speed and accuracy of information over the internet.

6. 8

7. The number of bits per second a system can transmit.

Explanation:

hey lol

3 0
2 years ago
Select all that apply. Two physical things you can do to demonstrate you are paying attention to a speaker are _____ and _____.
omeli [17]
B and d ............
7 0
3 years ago
Read 2 more answers
Other questions:
  • Given num_rows and num_cols, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E. Print
    7·1 answer
  • What should a career plan include?
    7·1 answer
  • Software engineering design teams use ________, which are grounded in mathematical concepts of sets and relations, for their sof
    13·1 answer
  • Whats the Sioux City school wifi?
    15·2 answers
  • If you're doing a relational comparison, which filter would be available?
    15·1 answer
  • What can cause a Lenovo computer to be very slow right after after turning it on?
    14·1 answer
  • Computers are designed with what type of memory?
    13·1 answer
  • Joe runs a handyman service. He enjoys writing and keeping up on the latest trends. He wants to share this information with his
    14·1 answer
  • To move the first line of text over five spaces and leave the other lines of the paragraph aligned to the left, use the _____ fe
    12·2 answers
  • WILL GIVE BRAINLIEST!!! Danielle is warehouse supervisor for a large shipping company. Most shipments need to leave the warehous
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!