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]
2 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]2 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
What type of malicious procedure involves using sniffing tools to capture network communications to intercept confidential infor
Alex_Xolod [135]

Answer:

eavesdropping

Explanation:

Eavesdropping is as an <em>electronic attack</em> where digital communications are intercepted by an individual whom they are not intended. This is done in two main ways: <em>Directly listening</em> to digital or analog voice communication or the <em>interception or sniffing</em> of data relating to any form of communication.

4 0
3 years ago
A website wants to gives out detailed information to viewers about its upcoming conference and also provides a feature for searc
Alenkinab [10]

Answer: WIREFRAME

A website wireframe, also known as a page schematic or screen blueprint, is a visual guide that represents the skeletal framework of a website.[1]:166 Wireframes are created for the purpose of arranging elements to best accomplish a particular purpose. The purpose is usually being informed by a business objective and a creative idea. The wireframe depicts the page layout or arrangement of the website's content, including interface elements and navigational systems, and how they work together.[2]:131 The wireframe usually lacks typographic style, color, or graphics, since the main focus lies in functionality, behavior, and priority of content.[1]:167 In other words, it focuses on what a screen does, not what it looks like.[1]:168 Wireframes can be pencil drawings or sketches on a whiteboard, or they can be produced by means of a broad array of free or commercial software applications. Wireframes are generally created by business analysts, user experience designers, developers, visual designers, and by those with expertise in interaction design, information architecture and user research.

3 0
3 years ago
Write an algorithm that receives a number from the user (you can store the number in a variable called N). Then the algorithm sh
lbvjy [14]

Answer:

Algorithm:

1. Declare an integer variable N.

2. Read the value N from user.

3.While(N):

 3.1 find r=N%10;

 3.2 print r in new line.

 3.3 Update N as N=N/10.

4.end program.

Implementation in C++.

// header

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

// variable

int N;

cout<<"Enter an Integer:";

   cin>>N;

// find the digits of number

   while(N)

   {

       // last digit

       int r=N%10;

       // print last digit

       cout<<r<<endl;

       // update the number

       N=N/10;

}

return 0;

}

Output:

Enter an Integer:329                                        

9                                                          

2                                                          

3

7 0
2 years ago
What block(s) would most effectively keep a sprite from moving off the screen?
Sonja [21]

The block most effectively keep a sprite from moving off the screen if if on edge, bounce. Hence option B is correct.

<h3>What is screen?</h3>

Screen is defined as a portable or stationary object that offers shelter, acts as a partition, etc., and often consists of a covered frame. Screening is defined as the procedure of locating or choosing individuals from a community according to one or more selection criteria.

The block will kept more perfectly if one of the edge there is bounce so that the box will not fall from the sprite.

Thus, the block most effectively keep a sprite from moving off the screen if if on edge, bounce. Hence option B is correct.

To learn more about screen, refer to the link below:

brainly.com/question/23902291

#SPJ1

8 0
10 months ago
Your new client's AdWords account has one campaign with one ad group that contains a list of hundreds of keywords. Which best pr
Degger [83]
<span>Create new ad groups with related keywords grouped together</span>
8 0
3 years ago
Other questions:
  • A user can easily move to the end of a document by pressing the _____ key combination.
    10·2 answers
  • Explain how to identify a starting position on a line.
    15·2 answers
  • Write the percentage 5 1/4 as a decimal​
    8·1 answer
  • 6. A distribution consists of three components with frequencies 200, 250 and 300 having means
    14·1 answer
  • The program processes the command line arguments. The arguments indicate which signals to catch:________. A. The program emits a
    10·1 answer
  • You have answered 4 of 18 questions.
    12·2 answers
  • Select the correct answer.
    11·1 answer
  • Write a pseudocode that receives a positive number from the user, and then,
    14·1 answer
  • DIRECTIONS: Organize your desktop. Name the 5 folders based on the files given below. Organize your own desktop by sorting the g
    12·1 answer
  • _____ is a system in which a finite set of words can be combined to generate an infinite number of sentences.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!