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
The definition of an "analog device" is that it is a type of _____.
sveta [45]
ITS C hope it helps goo luck!
5 0
3 years ago
What is the output of this program?
Charra [1.4K]

Answer:

20

Explanation:

assuming the print statement is not indented, the program effectively calculates 2+5+6+7.

The range(...) is <em>excluding </em>the end value (8 in this case).

3 0
3 years ago
Read 2 more answers
What is “GoF” and how does it relate to design patterns?
tatuchka [14]

Answer:

GOF refers to the gang of four pattern that are generally consider the basic for all the other patterns. Design pattern are basically provide the solution to the software design to resolve all problems that are associated with the development of real world applications.

GOF Design pattern implemented the parts of the re-usable object oriented software applications. The main aim of design pattern is to pass all the structural design pattern. Design pattern is the most powerful and helpful tool for the software developer and architecture.  

3 0
3 years ago
I need help with the code practice 9.2 Edhesive.<br><br> Thank you
antiseptic1488 [7]

Answer:

you talking about anaconda navigation? i would love to help!

Explanation:

3 0
3 years ago
Read 2 more answers
List 7 basic internal component found in a computer tower?
NISA [10]
7 Basic Internal Component found in a computer tower:

1) Power Supply
2) Central Processing Unit (CPU)
3) Hard Disk Drive (HDD)
4) Motherboard
5) Video card
6) Random Access Memory (RAM)
7) Sound Card

*Expansion Card, Network Card, Bluetooth Card
3 0
3 years ago
Read 2 more answers
Other questions:
  • "under the control panel, what console contains print management, computer management, and event viewer?"
    11·1 answer
  • In step 2 of the mail merge process you must be prepared to
    6·2 answers
  • If str 1 and str2 are both Strings, which of the following expressions will correctly
    13·1 answer
  • Drawing programs typically create images using mathematical formulas, instead of by coloring pixels, so images can be resized an
    12·1 answer
  • A digital designer might do computer animations for video games,<br> OA<br> True<br> OB<br> False
    12·2 answers
  • Explain the computer according to size​
    10·1 answer
  • Pls help I will give points
    7·1 answer
  • what is example of application of machine learning that can be imposed in eduction. (except brainly.)
    9·1 answer
  • Write a program that: Takes the list lotsOfNumbers and uses a loop to find the sum of all of the odd numbers in the list (hint:
    5·1 answer
  • SO I LIKE BOILED EGGS AND MY MUM WAS MAKING SALAD FOR DINNER SO I SAID DID YOU MAKE AND EGG-TRA ONE FOR ME
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!