Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

What could be the risks that the company is facing as a result of these technologies?
Explain the latest technologies and trends in protection of data and IT systems
What kind of loopholes in organisational IT systems attract hackers
Which of the following statements is incorrect?

A. We can use s.iteritems() on a pd.Series object s toiterate on it

B. If s and s1 are two pd.Series objects, we cannot use s.append(s1) to directly append s1 to the existing series s

C. loc and iloc are two useful and commonly used pandas method

D. If s is a pd.Series object, then we can use s.loc[label] to get all the data where the index is equal label
1. Which of the following can be used to create a DataFrame in Pandas?

A. Pandas Series object
B.2D ndarray
C. Python dict
D. All of the above

2. For the Series s1 and s2 defined below, which of the following statements will give an error?

import pandas as pd
s1 = pd.Series({1: 'Alice', 2: 'Jack', 3: 'Molly'})
s2 = pd.Series({'Alice': 1, 'Jack': 2, 'Molly': 3})

A. s2.loc[1]
B. s1.loc[1]
C. s2[1]
D.s2.iloc[1]
1. import pandas as pd
d = {
'1': 'Alice',
'2': 'Bob',
'3': 'Rita',
'4': 'Molly',
'5': 'Ryan'
}
S = pd.Series(d)

In the above python code, the keys of the dictionary d represent student ranks and the value for each key is a student name. Which of the following can be used to extract rows with student ranks that are lower than or equal to 3?

A. S.loc[0:2]
B. S.loc[0:3]
C. S.iloc[0:3]
D. S,ilo[0:2]
1. What will be the output of the variable L after the following code is executed?

import re

s = 'ACAABAACAAAB'
result = re.findall('A{1,2}', s)
L = len(result)

A. 5
B. 8
C. 12
D. 4
1. Which of the following is the correct output for the code given below?

import numpy as np

old = np.array([[1, 1, 1], [1, 1, 1]])
new = old
new[0, :2] = 0
print(old)

A. [[1 1 1 ] [ 1 1 1]]
B. [[0 0 1] [ 1 1 1]]
C. [[0 1 1] [ 0 1 1]]
D.[[1 1 0] [ 1 1 0]]

2.

import re
s = 'ACBCAC'

For the given string, which of the following regular expressions can be used to check if the string starts with 'AC'?

A. re.findall('[^A]C', s)
B. re.findall('^[AC]', s)
C. re.findall('^AC', s)
D.re.findall('AC', s)
Consider the following variables in Python:

a1 = np.random.rand(4)
a2 = np.random.rand(4, 1)
a3 = np.array([[1, 2, 3, 4]])
a4 = np.arange(1, 4, 1)
a5 = np.linspace(1 ,4, 4)

Which of the following statements regarding these variables is correct?

A. a3.shape == a4.shape
B. a4.ndim() == 1
C. a5.shape == a1.shape
D. a1.shape == a2.shape
What is the difference between the following three statements?
cout<<'A';
cout<<"A";
cout<<A;
LATEST TUTORIALS
APPROVED BY CLIENTS