Computer Science Questions and Answers



Recent Questions :: Computer Science

3398 QuestionsPage 1 of 340.
View:AllAnsweredUnanswered

Determine the Output of the Given Pseudocode

What will be the output of the following pseudocode?
integer a, b
set a = 15, b = 7
a= a mod(a-3)
b= b mod (b-3)
a=a mod 1
b=b mod 1
print a+b

Asked by: Sainath on Jan 28, 2021.EDIT

Artificial Intelligence: Find the Degree of AI for Drawing Energy

Various subfields of AI have held contests by defining a standard task and inviting researchers to do their best. Examples include the DARPA Grand Challenge for robotic cars, The International Planning Competition, the Robocup robotic soccer league, the TREC information retrieval event, and contests in machine translation, speech recognition. Investigate one of these contests, and describe the progress made over the years. To what degree have the contests advanced the state of the art in AI? To what degree do they hurt the field by drawing energy away from new ideas?

Asked by: Gopinadh on Jan 28, 2021.EDIT

Find the Number of Page Faults

If FIFO page replacement is used with four-page "frames and eight pages, how many page faults will occur with the reference string 0 1 72327103 if the four frames are initially empty?
Repeat this process for LRF

Asked by: Prantar Bhattacharjya on Dec 28, 2020.EDIT

Find the Number of Subnets

Given the IP address of 172.16.1.1 with a mask of 255.255.255.0. How many total subnets could be created? (Assume all subnets use the same subnet mask)

Asked by: Rusty on Nov 19, 2020.EDIT

Find the Class of IP Address 172.16.33.1/24

What address Class does 172.16.33.1/24 belong to?

Asked by: Rusty on Nov 19, 2020.EDIT

Technical : Predict the Output of the Given Code

Please explain the code and predict the output:

import numpy as np
import matplotlib.pyplot as plt
from scipy import signal

"""
parameters:
rhp - spectral noise density unit/SQRT(Hz)
sr - sample rate
n - no of points
mu - mean value, optional

returns:
n points of noise signal with spectral noise density of rho
"""
def white_noise(rho, sr, n, mu=0):
sigma = rho * np.sqrt(sr/2)
noise = np.random.normal(mu, sigma, n)
return noise

rho = 1
sr = 1000
n = 1000
period = n/sr
time = np.linspace(0, period, n)
signal_pure = 100*np.sin(2*np.pi*13*time)
noise = white_noise(rho, sr, n)
signal_with_noise = signal_pure + noise

f, psd = signal.periodogram(signal_with_noise, sr)

print("Mean spectral noise density = ",np.sqrt(np.mean(psd[50:])), "arb.u/SQRT(Hz)")

plt.plot(time, signal_with_noise)
plt.plot(time, signal_pure)
plt.xlabel("time (s)")
plt.ylabel("signal (arb.u.)")
plt.show()

plt.semilogy(f[1:], np.sqrt(psd[1:]))
plt.xlabel("frequency (Hz)")
plt.ylabel("psd (arb.u./SQRT(Hz))")
#plt.axvline(13, ls="dashed", color="g")
plt.axhline(rho, ls="dashed", color="r")
plt.show()

Asked by: Saranya on Oct 30, 2020.

Create a Database for a City

Implement a city database, each database record contains the name of the city (a string of arbitrary length) and the coordinates of the city expressed as integer x and y coordinates. Your database should allow records to be inserted, deleted by name or coordinate, and searched by name or coordinate. Another operation that should be supported is to print all records within a given distance of a specified point (capital city).

Asked by: Suryajith on Oct 27, 2020.

Uses of The Floppy Disk

What are the uses of the floppy disk?

Asked by: Abubakar Sadiq Umar on Oct 15, 2020.

Number of Arguments Passed in an Applet

How many arguments to be passed to an applet using pram tag?

Asked by: Ranjeet Kumar on Sep 29, 2020.

Choose the Answer: Information Retrieval

Information retrieval is faster from?

A) Floppy disk
B) Magnetic tape
C) Hard disc
D) All of these.

Asked by: Mahmud Ullah on Sep 27, 2020.

Sponsored Links


Current Affairs

Quick Links