[solved] – Question 80

What’s the matlab code for creating random symmetric positive definite matrix?

Expert Answer


[solved] – Question 800

How to define a reference type?

Expert Answer


[solved] – Question 80014

What is the value of h(231,8) for the function below?
def h(m,n):
ans = 0
while (m >= n):
(ans,m) = (ans+1,m-n)
return(ans)

Expert Answer


[solved] – Question 80025

when opening a file, the “wt” parameter indicated that we:

want to append to the end of the text file.

want to write data to a text file.

that we are opening a binrary file.

that we are reading from a text file.

Expert Answer


[solved] – Question 80026

What is the value of h(231,8) for the function below?

def h(m,n):
ans = 0
while (m >= n):
(ans,m) = (ans+1,m-n)
return(ans)

Expert Answer


[solved] – Question 80039

Write a function intreverse(n) that takes as input a positive integer n and returns the integer obtained by reversing the digits in n.

Here are some examples of how your function should work.

>>> intreverse(783)
387
>>> intreverse(242789)
987242
>>> intreverse(3)
3

Expert Answer


[solved] – Question 80041

What is the value of h(231,8) for the function below?
def h(m,n):
ans = 0
while (m >= n):
(ans,m) = (ans+1,m-n)
return(ans)

Expert Answer


[solved] – Question 80070

Write a function sumprimes(l) that takes as input a list of integers l and retuns the sum of all the prime numbers in l.

Here are some examples to show how your function should work.

>>> sumprimes([3,3,1,13])
19
>>> sumprimes([2,4,6,9,11])
13
>>> sumprimes([-3,1,6])
0

Expert Answer


[solved] – Question 80078

Declare a structure telerec in C++, containing name (20 characters) and telephone number. Write a program to maintain a file of telephone records. The program should allow the following functions on the file:
1) To append records in the file.
2) Display the name for a given telephone number. If the telephone number does not exist then display error message “record not found”.
3) Display the telephone number(s) for a given name. If the name does not exist then display error message “record not found”.

Expert Answer


[solved] – Question 80101

9. a) Explain the layers of TCP/IP reference model. Compare its advantages and
disadvantages with respect to OSI model.

Expert Answer