Write a numPy program to create a numPy array with all values as True printed 10 times. -Technology

1 Answer

Answer :

<i>This answer was deleted by our moderators...</i>

Related questions

Description : Write a Numpy program to create a 3x3 identity matrix, i.e. diagonal elements are 1, the rest are 0. Replace all 0 to random number from 10 to 20 -Technology

Last Answer : import numpy as nparray1=np.identity(3)print(array1)x=np.where(array1==0)for i in x:array1[x]=np.random.randint(low=10,high=20)print(array1)

Description : Write a Numpy program to create a 3x3 identity matrix, i.e. non diagonal elements are 1, the rest are 0. Replace all 0 to random number from 1 to 10 -Technology

Last Answer : import numpy as npZ = np.arange(9).reshape(3,3)print (Z)x=np.where((Z%2)==0)for i in x:Z[x]=np.random.randint(low=10,high=20)print(Z)

Description : Python: how to convert a Numpy array of values True/False to 1/0 -Web-Development

Last Answer : answer:

Description : Fill in the blank with appropriate numpy method to calculate and print the variance of an array. -Technology

Last Answer : print(np.var(data,ddof=0))

Description : Python: create an empty Numpy array/matrix -Web-Development

Last Answer : answer:

Description : numpy.linalg.LinAlgError: Last 2 dimensions of the array must be square -Web-Development

Last Answer : answer:

Description : How to remove duplicate rows of a Numpy array -Web-Development

Last Answer : answer:

Description : How to calculate average (mean) of each column in a numpy array -Web-Development

Last Answer : answer:

Description : Python : Append to Numpy array Vs append to list -Web-Development

Last Answer : answer:

Description : Python : How to count the occurrence/frequency of certain item in a numpy array -Web-Development

Last Answer : answer:

Description : Python : How to find the indices of a particular element in a numpy array -Web-Development

Last Answer : answer:

Description : Python: How to get the indices of several elements in a list or numpy array at once? -Web-Development

Last Answer : answer:

Description : Python : How to find the indices of elements in a sublist in a list or numpy array -Web-Development

Last Answer : answer:

Description : Consider a given Series , M1: Write a program in Python Pandas to create the series. -Technology

Last Answer : import pandas as pdm1=pd.Series([45,65,24,89],index=['term1','term2','t erm3','term4'])

Description : Write a program in Python Pandas to create the following DataFrame batsman from a Dictionary: B_NO Name Score1 Score2 -Technology

Last Answer : Alternative Answer

Description : Write some code that declares an array on ints, assigns the values: 0,1,2,5,7,8,11 to that array and use a foreach to do something with those values.

Last Answer : int x = 0, y = 0; int[] arr = new int [] {0,1,2}; foreach (int i in arr) { if (i%2 == 0) x++; else y++; }

Description : ……… is used to translate scanned images of handwritten, type written or special type of font printed on a conventional paper. -Technology

Last Answer : OCR is used to translate scanned images of handwritten, type written or special type of font printed on a conventional paper.

Description : The printed information on the paper is called …….. -Technology

Last Answer : The printed information on the paper is called hardcopy.

Description : A report allows you to represent data retrieved from one or more tables so that, it can be analysed and printed if required. -Technology

Last Answer : True When you want to print those records which are fetched from your database then, reports are more useful for this purpose.

Description : ……………. means that a printed document is exactly a copy of what you see on screen. -Technology

Last Answer : WYSIWYGmeans that a printed document is exactly a copy of what you see on screen.

Description : The entire Word document can be printed by choosing Microsoft Office button —> Print and OK. -Technology

Last Answer : TrueSteps for printing the document is Microsoft Office button —> Print and OK.

Description : ………………… is a tool in MS_Word using which customized letters, mailing labels and envelopes can be printed in bulk. -Technology

Last Answer : Mail Mergeis a tool in MS-Word using which customized letters, mailing labels and envelopes can be printed in bulk.

Description : Why is an E_book more accessible than a printed book? -Technology

Last Answer : E-book can be accessed, download or read with the help Internet.Multiple copies can be made easily and made available simultaneously to all the users who need it.If E-book is on network, then same book can be utilized/studied by more than one user.

Description : Ram wants to create a text file to store name and roll number of his students. Suggest, which program he should use. -Technology

Last Answer : He can create a text file using Notepad or WordPad. Follow these steps to create a file using Notepad:(a) Step 1:Click Start.(b) Step 2:Choose All Programs -> Accessories -> Notepad.(c) Step 3: ... dialog box will appear.(g) Step 7:Give file name with extension.(h) Step 8: Click Save button.

Description : Write an HTML code to create the following table: 100 Amit 10 A -Technology

Last Answer : The HTML code is Roll NumberNameClass 100 Amit 10 A 101 Ankit 10 B 102 Arnab 10C Footer 1 Footer 2 Footer 3

Description : Write down the formula for adding values of cells A1 to A5. -Technology

Last Answer : Formula for adding values of cells A1 to A5 would be =SUM(A1 : A5).

Description : How many times the word 'print' shall be printed by the following program segment? for(i=1, i≤2, i++) for(j=1, j≤2, j++) for(k=1, k≤2, k++) printf("print/n") (A) 1 (B) 3 (C) 6 (D) 8

Last Answer : (D) 8

Description : Accept data for five students and display it. Write a C++ program to displya sum of array elements of array size n. 

Last Answer : #include<iostream.h> #include<conio.h> void main() { int arr[20],i,n,sum=0; clrscr(); cout<<"\nEnter size of an array:"; cin>>n; cout<<"\nEnter ... ; } cout<<"\nSum of array elements is:"<<sum; getch(); }

Description : Write a C++ program to accept array of five elements, find and display smallest number from an array.

Last Answer : #include<iostream.h> #include<conio.h> void main() { int a[5],smallest,i; clrscr(); cout<<" Enter array elements:"; for(i=0;i<5;i++) cin>>a[i] ... } } cout<<endl<<"Smallest number="<<smallest; getch(); }

Description : Write a program to sort elements of an array in ascending order.

Last Answer : #include #include void main() { int a[5],i,j,temp; clrscr(); printf("\n Enter array elements:"); for(i=0;i

Description : Write a program to compute the sum of all elements stored in an array using pointers.

Last Answer : #include #include void main() { int a[5],sum=0,i,*ptr; clrscr(); printf("\n Enter array elements:"); for(i=0;i

Description : Write a program to search a number from an array using pointer to array.

Last Answer : #include<iostream.h> #include<conio.h> void main() { int a[5],i,*a1,no,flag=1; clrscr(); a1=&a[0]; cout<<"\nEnter array elements :"<<endl; for(i=0;i<5 ... =0) { cout<<"\n\t Number is not present.... "; } getch(); }

Description : Write a program in C++ to search an element from an array using pointer.

Last Answer : #include<iostream.h> #include<conio.h> void main() { int a[10], n, i,*p, flag=0, x; clrscr(); cout<<"Enter no. of array elements \n"; cin>>n; cout<< ... } if(flag==0) cout<<x<<"is not found \n"; getch(); }

Description : Write a program to sort an 1-d array in ascending order.

Last Answer : #include<iostream.h> #include<conio.h> void main() { int arr[20]; int i, j, temp,n; clrscr(); cout<<"\n Enter the array size:"; cin>>n; cout<<"\n Enter ... 0;i<n;i++) {  cout<< \n <<arr[i]; } getch(); }

Description : To accept 100 different values into the array we require A) Loop B) If condition C) Function D) Structure

Last Answer : A) Loop

Description : Design a programme in C to read the n numbers of values in an array and display it in reverse order.

Last Answer : #include #include #define max 50 void main() { int a[max],i,n; clrscr(); printf("\n Enter number of elements:"); scanf("%d",&n); printf("\n Enter array element:"); for(i=0;i=0;i--) printf("\t%d",a[i]); getch(); }

Description : When an array is passed as a parameter to a function which of the following statements is correct? (A) The function can change values in the original array. (B) The function cannot change values in the original array. (C) Results in compilation error. (D) Results in runtime error.

Last Answer : (A) The function can change values in the original array.

Description : How many values can be held by an array A(-1,m;1 ,m) ? (A) m (B) m2 (C) m(m+l) (D) m(m+2)

Last Answer : (D) m(m+2) Explanation: Total number of values =m(m+2). Because -1 to m, m+2 values and 1 to m, m values

Description : When an array is passed as parameter to a function, which of the following statements is correct ? (A) The function can change values in the original array. (B) In C, parameters are passed by value, ... . (D) Results in a run time error when the function tries to access the elements in the array.

Last Answer : (A) The function can change values in the original array.

Description : Write the HTML code to create a paragraph whose text color is blue. -Technology

Last Answer : or

Description : Write the HTML code to create a link for school .jpg located at C:\. -Technology

Last Answer : Image

Description : Write the HTML code to create the exact table which is given below: ADMNO SNAME NAME DOB -Technology

Last Answer : The HTML code is ADMNO SNAMENAMEDOB1110MANJITRANJIT4-MAR-1998

Description : Write the complete … tags to create a table with the following contents. -Technology

Last Answer :

Description : Write the steps to create a new document. -Technology

Last Answer : Steps to create a new blank document are as follows:(a) Step 1: Click the Microsoft Office button.(b) Step 2: Select New, the New Document dialog box will appear as shown below:(c) Step 3: ... (It will be highlighted bydefault).(d) Step 4: Click Create button, a new blank document will appear.

Description : Write SQL query to create a table “BOOKS” with the following structure: Table: BOOKS -Technology

Last Answer : Create table Books(BOOK_ID Integer (2) Primary Key,BOOK_NAME Varchar (20),CATEGORY Varchar (20),ISSUE_DATE Date);

Description : Write SQL query to create a table “Registration” with the following structure: -Technology

Last Answer : Create table Registration(Reg_Id Integer(2) Primary Key,Name varchar(20),Course varchar(10),Join_Dt date);

Description : Write a python code to create a data frame with appropriate headings from the list given below : -Technology

Last Answer : import pandas as pd# initialize list of listsdata = [['S101', 'Amy', 70], ['S102', 'Bandhi', 69], ['S104','Cathy', 75], ['S105', 'Gundaho', 82]]# Create the pandas DataFramdf = pd.DataFrame(data, columns = ['ID', 'Name', 'Marks'])# printdataframe. print(df )

Description : Write a small python codeto create a dataframewith headings(a and b) from the list given below : [[1,2],[3,4],[5,6],[7,8]] -Technology

Last Answer : import pandas as pddf = pd.DataFrame([[1, 2], [3, 4]], columns = ['a','b'])df2 = pd.DataFrame([[5, 6], [7, 8]], columns = ['a','b'])df = df.append(df2)

Description : Write SQL query to create a table Inventory with the following structure : -Technology

Last Answer : CREATE TABLE Inventory(Material Id Integer Primary Key,Material Varchar (50) NOT NULL,Category Char,DatePurchase Date) :

Description : Write SQL query to create a table Player with the following structure : -Technology

Last Answer : CREATE TABLE Player(};