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

Describe what it does and compute what value is returned when the input is the list{1, 2, 3, 4, 5}. (Hint:We’re using 0-based array indexing, so 0 would represent the index of the first element, 1 the second element,etc.)

i←0
while i < n−2 do
if A[i]A[i+1]> A[i+ 2 ]then
returning i
i←i+ 1
return−1
Identify and describe the worst-case input and best case input

i←0
while i < n−2do
if A[i]A[i+1]> A[i+ 2] then
returning i
i←i+ 1
return−1
Explain 3 ways in which through which human being can be infected with computer virus

1.     The interest rate used on funds deposited in a bank is determined by the amount of time the money is left on deposit. For a particular bank, the following schedule is used:


Time on deposit

Interest rate

Greater than or equal to 5 years

0.0475

Less than 5 years but greater than or equal to 4 years

0.045

Less than 4 years but greater than or equal to 3 years

0.040

Less than 3 years but greater than or equal to 2 years

0.035

Less than 2 years but greater than or equal to 1 year

0.030

Less than 1 year

0.025



How to make a script file and a plain text output file (.txt) that contains the test output?
Develop a class of 2 x 2 matrices of double precision floating point variables that has the features listed below.
• A method (function) that returns the determinant of the matrix.
• A method that returns the inverse of the matrix, if it exists.
• Overloading of the assignment operator, allowing us to write code such as A =B; for instances of the class A and B.
Give examples showing how "super" and "this" are useful with inheritance in Java. Include examples of using "super" and "this" both as constructors and as variables.
Give at least three examples that show different features of string slices. Describe the feature illustrated by each example. Invent your own examples. Do not copy them for the textbook or any other source.
. Consider the loop from Section 8.3 of your textbook.

prefixes = 'JKLMNOPQ'
suffix = 'ack'

for letter in prefixes:
print(letter + suffix)

Put this code into a Python script and run it. Notice that it prints the names "Oack" and "Qack".

Modify the program so that it prints "Ouack" and "Quack" but leaves the other names the same.

Include the modified Python code and the output in your submission.
Write a function named test_sqrt that prints a table like the following using a while loop, where "diff" is the absolute value of the difference between my_sqrt(a) and math.sqrt(a).
a = 1 | my_sqrt(a) = 1 | math.sqrt(a) = 1.0 | diff = 0.0
a = 2 | my_sqrt(a) = 1.41421356237 | math.sqrt(a) = 1.41421356237 | diff = 2.22044604925e-16
a = 3 | my_sqrt(a) = 1.73205080757 | math.sqrt(a) = 1.73205080757 | diff = 0.0
a = 4 | my_sqrt(a) = 2.0 | math.sqrt(a) = 2.0 | diff = 0.0
a = 5 | my_sqrt(a) = 2.2360679775 | math.sqrt(a) = 2.2360679775 | diff = 0.0
a = 6 | my_sqrt(a) = 2.44948974278 | math.sqrt(a) = 2.44948974278 | diff = 0.0
a = 7 | my_sqrt(a) = 2.64575131106 | math.sqrt(a) = 2.64575131106 | diff = 0.0
a = 8 | my_sqrt(a) = 2.82842712475 | math.sqrt(a) = 2.82842712475 | diff = 4.4408920985e-16
a = 9 | my_sqrt(a) = 3.0 | math.sqrt(a) = 3.0 | diff = 0.0

Modify your program so that it outputs lines for a values from 1 to 25 instead of just 1 to 9.
LATEST TUTORIALS
APPROVED BY CLIENTS