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
spayn [35]
3 years ago
13

Write a python function genRandomVect that returns a random 1d numpy array of size (50,) where each element is an integer sample

d from [0, 100) and no two elements in the vector are the same.
Your code snippet should define the following variable:

Name Type Description
genRando function function that returns a numpy array of shape (50,) that
contains random elements on the interval [0, 100) and
no duplicates
Computers and Technology
1 answer:
SSSSS [86.1K]3 years ago
6 0

Answer:

import numpy as np

def genRandomVect():

   arr = np.random.choice(range(100),size=(50,),replace=False)

   return arr

 

print("Random 1D numpy array where each element is an integer sampled from: [0, 100) ")

print( genRandomVect() )

Explanation:

  • Create a function to create a numpy array with random integers in range[0,100) with no duplicates
  • Use the random.choice to select random values from range[0,100)  and size attribute to take the size of the required array .
  • Finally return the numpy array.

You might be interested in
Stored information about a previous visit to a web site is called information _____.
Nikitich [7]
The answer would be Cookies.
6 0
3 years ago
Write a Java program that calculates and prints the monthly pay check for an employee. The net pay is calculated after taking th
ycow [4]

Answer:

  import java.util.Scanner;

public class salary{

    public static void main(String []args){

       

       System.out.println("Enter the monthly pay: ");

       Scanner scn = new Scanner(System.in);

       double salary = scn.nextDouble();

       double result = salary-(salary*0.15*0.035*0.0575*0.0275*0.05)-75;

       

        System.out.println("The net salary is: "+result);

    }

}

Explanation:

first import the Scanner class for taking the input from user.

then, create the main function and print the message for enter the salary from user.   scn.nextDouble() store the value enter by user into the result.

after that, calculate the net salary by calculating the deduction amount and then subtract with salary.

finally, print the result on the screen.

8 0
4 years ago
Which section in a slide is not visible to the viewers of a presentation, but is visible to the presenter in the normal Slide vi
lyudmila [28]

Answer:

the speakers note

Explanation:

when putting it in presenter view it'll have a separate window so you'll have access and see speaker notes etc

3 0
3 years ago
55 POINTS, IN JAVA
ikadub [295]

public class JavaApplication82 {

   

   public static void main(String[] args) {

       

       for (int i = 1; i <= 9; i++){

           for (int w = 0; w < i; w++){

               System.out.print("*");

           }

           System.out.println("");

           

       }

   }

   

}

This works for me.

6 0
3 years ago
Should I Buy a 2070 super or 2060 super
fiasKO [112]

Answer:

Which ever one you want

Explanation:

Make your heart happy

8 0
3 years ago
Other questions:
  • Considers the assets of all things in an environment, and refers to the layering of security tools and methods often varying num
    13·1 answer
  • Is an application that creates electronic worksheets composed of rows and columns?
    7·1 answer
  • Powerpoint increased the weight of a line in ____ increments.
    13·1 answer
  • Which event most led to a reduction in the size and cost of computers? a. invention of the Bessemer converter b. development of
    8·2 answers
  • The _______ of a secondary storage device indicates how much data the storage medium can hold.
    13·1 answer
  • Which of the following extends a network over a large geographic area by connecting local area networks together?
    14·2 answers
  • What does ADAC mean <br> pls answer quickly i will mrk brainliest
    14·2 answers
  • Who has more Tanks? Russia or USA? You get ti right and you get BRAINLIEST
    12·2 answers
  • Which option will be used to attach email messages ​
    6·1 answer
  • Becuase privacy is personal customers, where should your data privacy efforts align?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!