Questions
Many people criticize what we’ve covered so far as not being true artificial intelligence. This criticism...

  1. Many people criticize what we’ve covered so far as not being true artificial intelligence. This criticism is often targeted at expert systems specifically but also at the idea of search itself as Artificial intelligence. Briefly answer the following in your own words (2-4 sentences)

(These will be graded both on the quality of your argument and your demonstration of understanding of what Expert systems are and what the Turing test is.)

Credit will only be given for typed answers.

  1. Do you believe expert systems can be defined as intelligence? Support your answer.
  2. Do you think Turing’s test is a good evaluation for whether or not an expert system is intelligent? Support your answer.

In: Computer Science

Create a Python program that includes each feature specified below. Comments with a detailed description of...

Create a Python program that includes each feature specified below.

  • Comments with a detailed description of what the program is designed to do in a comment at the beginning of your program.
  • Comments to explain what is happening at each step as well as one in the beginning of your code that has your name and the date the code was created and/or last modified.
  • The use of at least one compound data type (a list, a tuple, or a dictionary).
  • Use of at least one method with your compound data type.
  • Use of at least one Python built-in function with your compound data type.
  • An if statement with at least two elif statements and an else statement.
  • A nested if statement.
  • At least one value input by the user during the program execution.
  • At least one result reported to the user, that varies based on the value(s) that they input.

In: Computer Science

Programming assignment (75 pts): The Lab 1 development assignment was largely an exercise in completing an...

  1. Programming assignment (75 pts):

The Lab 1 development assignment was largely an exercise in completing an already started implementation. The Lab 2 development assignment will call on you to implement a program from scratch. It’s an exercise in learning more about Java basics, core Java Classes and Class/ method-level modularity.

Implement a ‘runnable’ Class called “NumericAnalyzer”. Here’s the functional behavior that must be implemented.

  • NumericAnalyzer will accept a list of 1 or more numbers as command line arguments. These numeric values do not need to be ordered (although you’ll need to display these values sorted ascendingly).

NOTE: Don’t prompt the user for input – this is an exercise passing values to your program via the command line!

  • Error checking: if the user fails to pass in parameters, the program will display an error message (of your choice) and exit early.
  • The main() method’s String [] args argument values must be converted and assigned to a numeric/integer array.
  • Your program will display the following information about the numbers provided by the user:
    1. This list of numbers provided by the user sorted ascendingly.
    2. The size of number list (the number of numbers!)
    3. The average or mean value.
    4. The median - the middle value of the set of numbers sorted. (Simple Algorithm: index = the length of the array divided by 2).
    5. The min value.
    6. The max value.
    7. The sum
    8. The range: the difference between the max and min
    9. Variance: Subtract the mean from each value in the list. This gives you a measure of the distance of each value from the mean. Square each of these distances (and they’ll all be positive values), add all of the squares together, and divide that sum by the number of values (that is, take the average of these squared values) .
    10. Standard Deviation: is simply the square root of the variance.

Development guidelines:

  • The output should be neat, formatted and well organized – should be easy on the eyes!
  • Your code should adhere to naming conventions as discussed in class.
  • Your main() method’s actions should be limited to:
    • gathering command line arguments
    • displaying error messages
    • creating an instance of NumericAnalyzer and invoking its top level method (e.g., “calculate()”, “display()” )
  • The “real work” should be performed by instance methods. That is, your implementation should embrace modularity:
    • Each mathematical calculation should probably be implemented by a separate method.
    • Yet another method should be responsible for displaying a sorted list of the numbers provided, and displaying all derived values above.

NOTE: Deriving calculations and displaying output to a Console are separate threads of responsibility, and should therefore be implemented independently of each other.

  • Your implementation should embrace using core Java modules:
    • Use the java.lang.Math Class methods to calculate square roots and perform power-to values.

So your main() method will include a sequence of instructions similar to this:

// main() method code fragment example
if(args.length == 0 ) {

// Display some error message … (System.err. )

System.exit(1);

}

NumericAnalyzer analyzer = new NumericAnalyzer(args);

analyzer.calculate();

analyzer.display();

System.exit(0);

Your ‘test cases’ should include testing for (see sample output below –PASTE YOUR Console OUTPUT ON PAGE 5 below):

  1. No input parameters – error condition.
  2. 1 value
  3. Multiple values – at least 6+ …

SAMPLE OUTPUT FOR TEST CASES 1, 2,   & 3

  1. Pass in 1 or more positive integer number values.

(2)

256

Count:                             1

Min:                             256

Max:                             256

Range:                             0

Sum:                             256

Mean:                            256

Median:                          256

Variance:                          0

Standard Deviation:                0

(3)

2    4    8    16   32   64   128 256 512

Count:                             9

Min:                               2

Max:                             512

Range:                           510

Sum:                           1,022

Mean:                            113

Median:                           32

Variance:                     25,941

Standard Deviation:              161

PASTE YOUR OUTPUT HERE

0 args

1 arg

multiple args (at least 6)

Sample output

2       4       8       16      32     64   128     256     512   

Size:                              9

Min:                               2

Max:                             512

Range:                           510

Sum:                           1,022

Mean:                            113

Median:                           32

Variance:                     25,941

Standard Deviation:              161

-----------------------------------------------------------------

Lab 1 java code (if needed)

public class JulianCalendar {

         

        static private final int MAX_DAY = 31;
         

        static private final String[] MONTH_NAMES = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct",

        "Nov", "Dec" };

         

        static private final int[] MONTH_SIZES = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
 

        static private void displayDayHeading() {

                System.out.printf("%6s", "Day");

        }
         

        static private void displayHeading() {

                displayDayHeading();

                for (int i = 0; i < MONTH_NAMES.length; ++i) {

                        System.out.printf("%5s", MONTH_NAMES[i]);

                }

                displayDayHeading();

        }

        static public void display() {

                displayHeading(); 

                for (int i = 0; i < MAX_DAY; i++) {

                        System.out.printf("\n%6d", i + 1);

                        for (int j = 0; j < MONTH_NAMES.length; j++) {

                                int sum = 0;

                                for (int k = 0; k < j; k++) {

                                        sum += MONTH_SIZES[k];

                                }

                                if (sum + MONTH_SIZES[j] >= sum + i + 1)

                                        System.out.printf(" %03d", sum + i + 1);

                                else

                                        System.out.printf(" %03d", 0);

                        }

                        System.out.printf("%6d", i + 1);

                }

                System.out.println();

        }



        public static void main(String[] args) {

                 

                display();

        }

}

In: Computer Science

Write a factorial C++ program where n=10,000,000

Write a factorial C++ program where n=10,000,000

In: Computer Science

DONE IN POWERSHELL create a function that allows the user to perform the following tasks a....

DONE IN POWERSHELL

create a function that allows the user to perform the

following tasks

a.

Create a folder named NetworkInformation

Create a file in the above folder named

NetworkInformation.txt. Pipe the Get-NetTCPConnection, Get-NetNeighbor, and Get-NetUDPEndPoint cmdlets output into the file

In: Computer Science

JAVA: Suppose we have a number of triangles and quadrilaterals in a 2-dimensional coordinate plane. we...

JAVA: Suppose we have a number of triangles and quadrilaterals in a 2-dimensional coordinate plane. we want to be able to easily determine the perimeter of each shape and move shapes around the coordinate plane. Download the Shape.java and Point.java from Moodle. - Shape.java is an interface contains getPerimeter() and move() abstract methods. - Point.java is a class object which provides getX(), getY(), distanceTo(Point p) and move() methods. Design two classes named Quadrilateral and Triangle that implement Shape interface to determine their perimeter of each shape and move shapes around the coordinate plane. Test your classes in a Driver class that use (1.0, 1.0), (1.0, 2.0), (2.0, 1.0) and (2.0, 2.0) as coordinates for Quadrilateral vertices and (1.0, 1.0), (1.0, 2.0), (2.0, 1.0) as coordinate for Triangle. Use methods from Point Object to calculate their perimeters and display their results. Use move method from Point Object to increment x coordinate by 1.0 and y coordinate by 2.0 for all vertices of both shapes. Calculate their perimeters and display their results.

SHAPE

import java.util.*;

public interface Shape {
public double getPerimeter();
public void move(double deltaX, double deltaY);
}

POINT

import java.util.*;


public class Point {
private double x;
private double y;
public Point(double x, double y) {
   this.x = x;
   this.y = y;
}
public double getX() {
   return x;
}

public double getY() {
return y;
}
public double distanceTo(Point p) {
   return Math.sqrt(Math.pow(this.getX() - p.getX(), 2) + Math.pow(this.getY() - p.getY(), 2));
}
public void move(double deltaX, double deltaY) {
x += deltaX;
y += deltaY;
}
}

In: Computer Science

Why are the original/raw data not readily usable by analytics tasks? What are the main data...

Why are the original/raw data not readily usable by analytics tasks? What are the main data preprocessing steps? List and explain their importance in analytics.

In: Computer Science

I wrote this code and it produces a typeError, so please can you fix it? import...

I wrote this code and it produces a typeError, so please can you fix it?

import random

def first_to_a_word():

print("###### First to a Word ######")
print("Instructions:")
print("You will take turns choosing letters one at a time until a word is formed.")
print("After each letter is chosen you will have a chance to confirm whether or not a word has been formed.")
print("When a word is formed, the player who played the last letter wins!")
print("One of you has been chosen at random to initiate the game.")
print()
print("Note: Words must be longer than a single letter!")
print()

  
#inputs / randomNumGen
player1 = input("Enter player 1's name: ")
player2 = input("Enter player 2's name: ")
random_number = random.randint(0, 1)
  
#output function
def output_func(player1, player2, random_number):
if random_number == 0:
word = input(player1, 'please enter a character: ')
print(player1, 'input:', word)
else:
word = input(player2, 'please enter a character: ')
print(player2, 'input:', word)
  
return word
  
#initial variables
word_confirm = ''
counter = 0
word_array = []
  
#character input loop
while word_confirm != 'yes':
  
#function call
word = output_func(player1, player2, random_number)
  
#append
word_array.append(word)
  
#alternate players turns
if random_number == 0:
random_number = 1
else:
random_number = 0
  
#check for exit after >=3 letters formed
if counter >= 2:
print('You have formed the letters:') #three letters
word_confirm = input('Has the word been formed? (type "yes" or "no"): ')
word_confirm = word_confirm.lower()
  
counter += 1
  
complete_word = ''
i = 0
while i < len(word_array):
  
complete_word += word_array[i]
i += 1
  
if random_number == 1:
print(player1, 'Wins!')
print('The word was:', complete_word)
else:
print(player2, 'Wins!')
print('The word was:', complete_word)
  
  

first_to_a_word()

In: Computer Science

1. Each of the queries in this section contain mistakes that prevent them from running. Explain...

1. Each of the queries in this section contain mistakes that prevent them from running. Explain the mistake and rewrite the query so it works. a. SELECT Customers.custid, Customers.companyname, Orders.orderid, Orders.orderdate FROM Sales.Customers AS C INNER JOIN Sales.Orders AS O ON Customers.custid = Orders.custid b. SELECT C.custid, C.companyname, COUNT(*) as numOrders FROM Sales.Customers as C INNER JOIN Sales.Orders as O WHERE C.custid = O.custid c. SELECT E.empid, COALESCE(COUNT(C.orderid),0) as numOrders FROM HR.Employees as E OUTER JOIN Sales.Customers as C ON E.custid = C.custid;

In: Computer Science

Write a function named timesOfLetter that reads an array and returns the number of times of...

Write a function named timesOfLetter that reads an array and returns the number of times of each lowercase letter and each uppercase letter appear in it, using reference parameter. • Write a function named timesOfNumber that reads an array and returns the number of times of each odd number, and each even number appear in it, using reference parameter. • Write a function named isChar() that determines if the input is alphabetic or not during inputting. • Write a function named isInt() that determines if the input is a digit or not during inputting. • Initialize the size of the arrays as 10.

Hints: • Firstly, determine whether the element is a letter or a number, which should not be any other characters. • By passing by reference, the values can be modified without returning them. • You may call a function inside another function.

In: Computer Science

There are two kinds of bank accounts: checking and savings. You can deposit to (i.e. add...

There are two kinds of bank accounts: checking and savings. You can deposit to (i.e. add money in) or withdraw (i.e. take money out) from an account. A checking account can be withdrawn with an unlimited number of times. A savings account can only be withdrawn at most N times per calendar month. Checking accounts have no monthly fee. Savings accounts have a fixed monthly fee X. But if you deposit at least a money amount of M each month, that fee is waived. You cannot overdraft (take out more money than the current balance) a savings account. For a checking account, if you overdraft, you will have to pay an overdraft fee. 1. Design 3 classes: Account, CheckingAccount, and SavingsAccount 2. Determine the fields and methods of each class. 3. Implement the methods to deposit and withdraw. Please use java for the code.

In: Computer Science

Plase, write program in c++. IP address consists of four integers of range [0, 255] separated...

Plase, write program in c++.
IP address consists of four integers of range [0, 255] separated by dots.
The next three rows show three correct IP-address:
130.0.0.0
193.197.0.01
255.00.255.255

Write a program that determines whether a given string is a valid IP-address.

outpot should be 1 if given IP address is valid, or 0 otherwise.

In: Computer Science

1. Obtain the 1’s complement, 2’s complement and sign magnitude system representation in 7 bits for...

1. Obtain the 1’s complement, 2’s complement and sign magnitude system representation in 7 bits for the following decimal numbers:

a) 1510

b) -2110

c) 3510

d) -2710

2. Use 1’s and 2’s complement system to perform the following calculations and mention if
there will be overflow or not:
a) 1100 – 0101
b) 1010 + 0100
c) 01100 + 00111

In: Computer Science

1. For each of the following, write a single SELECT query against the TSQLV4 database that...

1. For each of the following, write a single SELECT query against the TSQLV4 database that returns the result set described. Each of these queries involves two tables and can be written using a join operation.

a. One row for each order shipped to France or Germany, showing the order ID, the last name of the employee for the order, and the customer ID for the order.

b. One row for each employee who handled orders to Belgium, showing the employee’s initials (for example, for an employee named Yael Peled, this would be YP) and the number of orders that employee handled that were shipped to Belgium.

c. Same as part b., but include a row for every employee in the HR.Employees table, even if they did not handle any orders shipped to Belgium. (The number of orders for such an employee should be 0.)

In: Computer Science

Python 3 question Suppose that a directed and weighted graph represented as vertex-list, how could it...

Python 3 question

Suppose that a directed and weighted graph represented as vertex-list, how could it perform uniform cost search by using priority queue?

In: Computer Science