Questions
Identify three different schools of Buddhism. How are these schools similar in their beliefs and practices?...

Identify three different schools of Buddhism. How are these schools similar in their beliefs and practices? How do they differ? Cite supporting information from the topic materials.

In: Psychology

def sequentialSearch(theList, item):     #**** to be changed:     # counts the iterations of the while...

def sequentialSearch(theList, item):
    #**** to be changed:
    # counts the iterations of the while loop and returns this value
    found = False
    index = 0
    while index < len(theList) and not found:
        if theList[index] == item:
            found = True
        index = index + 1  
    return found                  

def binarySearch(theList, item):
    #**** to be changed:
    # counts the iterations of the while loop and returns this value
    startIndex = 0
    endIndex = len(theList)- 1
    found = False
    while startIndex <= endIndex and not found:
        middleIndex = (startIndex + endIndex)//2
        if item == theList[middleIndex]:  
            found = True
        elif item > theList[middleIndex]:
            startIndex = middleIndex + 1
        else:                             
            endIndex = middleIndex - 1
    return found   

# program for testing the search algorithms
dataSet = [-200, -190, -180, -170, -160, -110, -105, -74, -30, -17, -12, -1, 4, 5, 13, 26, 37, 42, 62, 96, 100, 110, 120,130]

print("\nSuccessful sequential search - all elements of the data set")  
totalComparisons = 0
#**** to be completed:
#     list traversal on the dataSet list:
#     for each item: perform a sequential search and
#                    display the number of comparisons,
#     count the total number of comparisons
print("Average number of comparisons: "+str(totalComparisons/len(dataSet)))
  
print("\nUn-successful sequential search")
target = 196                 # target not in the dataSet
comparisons = 0 #**** to be changed: perform a sequential search for target
print ("target " + str(target), "\t comparisons used " + str(comparisons))

print("\nSuccessful binary search - all elements of the data set")
totalComparisons = 0
#**** to be completed:
#     list traversal on the dataSet list:
#     for each item: perform a binary search and
#                    display the number of comparisons,
#     count the total number of comparisons
print("Average number of comparisons: "+str(totalComparisons/len(dataSet)))

print("\nUn-successful binary search")
target = 196                 # target not in the dataSet
comparisons = 0 #**** to be changed: perform a binary search for target
print ("target " + str(target), "\t comparisons used " + str(comparisons))

make some change to the python according to the comment line and complete the following question.

Sequential Search Algorithm

Binary Search Algorithm

Successful searches

Successful searches

Average number of comparisons

Average number of comparisons

Maximum number of comparisons

found at index _____________

Maximum number of comparisons

found at index _____________

Minimum number of comparisons

found at index____________

Minimum number of comparisons

found at index____________

Un-Successful search

Un-Successful search

Number of comparisons

Number of comparisons

  1. What is the size n of the data set used?
  2. What is the worst case for sequential search?
  3. What is the best case for sequential search?
  4. Is the worst case for sequential search O(n)?
  1. What is the best case for binary search?
  1. What is the worst case for binary search?
  1. Is the worst case for binary search O(log n)?

In: Computer Science

1. Using the standard enthalpies of formation, what is the standard enthalpy of reaction? CO(g) +...

1. Using the standard enthalpies of formation, what is the standard enthalpy of reaction?

CO(g) + H2O(g) --> CO2(g) + H2(g)

2. Calculate the standard enthalpy change for the following reaction at 25 �C.

HCl(g) + NaOH(s) --> NaCl(s) + H2O(l)

3. For a particular isomer of C8H18, the following reaction produces 5113.3 kJ of heat per mole of C8H18(g) consumed, under standard conditions.

C8H18(g) + 25/2O2(g) --> 8CO2(g) + 9H2O(g) (deltarxn = -5113.3 kJ)

What is the standard enthalpy of formation of this isomer of C8H18(g)?

4. Many power plants produce energy by burning carbon-based fuels, which also produces carbon dioxide. Carbon dioxide is a greenhouse gas, so over-production can have negative effects on the environment. Use enthalpy of formation data to calculate the number of moles of CO2(g) produced per megajoule of heat released from the combustion of each fuel under standard conditions (1 atm and 25 �C).

coal, C(s, graphite):

natural gas, CH4(g):

propane, C3H8(g):

octane, C8H18(l) (?Hf� = �250.1 kJ �mol-1):

In: Chemistry

A 460 turn solenoid, 25 cm long, has a diameter of 2.2 cm. A short 2.6...

A 460 turn solenoid, 25 cm long, has a diameter of 2.2 cm. A short 2.6 cm diameter 12 turn coil is wound around the solenoid at its midpoint. What rate of change of current in the solenoid, will cause a 220

In: Physics

write more specific examples of the ways Harriet Jacobs demonstrated the resistance of enslaved people.

write more specific examples of the ways Harriet Jacobs demonstrated the resistance of enslaved people.

In: Operations Management

Do the type-D and JK flip flops respond to the same clock edge? Explain how toggle...

Do the type-D and JK flip flops respond to the same clock edge?

Explain how toggle mode is the same as division by two.

What is the difference between a synchronous input (D, J, or K) and an asynchronous input (PR or CLR)?

*please no handwritten answers

In: Computer Science

A freight company uses a compressed spring to shoot 1.90kg packages up a 1.00-m -high frictionless...

A freight company uses a compressed spring to shoot 1.90kg packages up a

1.00-m -high frictionless ramp into a truck, as the figure(Figure 1) shows. The spring constant is 330N/m and the spring is compressed 35.0cm .

What is the speed of the package when it reaches the truck?
Express your answer with the appropriate units.
v =
SubmitMy AnswersGive Up
Part B
A careless worker spills his soda on the ramp. This creates a 50.0-cm-long sticky spot with a coefficient of kinetic friction 0.300. Will the next package make it into the truck?
A careless worker spills his soda on the ramp. This creates a 50.0--long sticky spot with a coefficient of kinetic friction 0.300. Will the next package make it into the truck?
Yes
No

In: Physics

Table Product: PROD_ID PROD_NAME PROD_PRICE PROD_VENDOR 1101 Table 100 2 1102 Chair 80 3 1103 Armchair...

Table Product:

PROD_ID

PROD_NAME

PROD_PRICE

PROD_VENDOR

1101

Table

100

2

1102

Chair

80

3

1103

Armchair

90

2

1104

Nightstand

110

1

1105

Bed

200

3

1106

Dresser

150

3

1107

Daybed

190

2

1108

Ash Table

120

2

1109

Cherry Table

130

2

1110

Table - High

100

2

1111

Office Chair

110

3

Table Vendor:

VEND_ID

VEND_NAME

VEND_ST

1

Green Way Inc

GA

2

Forrest LLC

NC

3

AmeriMart

NC

Please write the SQL script and provide screenshots of results for these below queries. Please include the SQL in text format, and all screenshots in one single document.

  1. Find the total number of table products
  2. Find the average price of all tables
  3. Find the total number of products from each vendor
  4. Find the average prices by vendors (please include vendor names in the query result)
  5. Find the average prices by states

In: Computer Science

1) Please state which function of money is being used by each of the following activities:...

1) Please state which function of money is being used by each of the following activities: Unit of Account (Standard of Value, Medium of Exchange or Store of Value.  Please explain the reasoning behind each answer.

(a) Brenda puts $600 into her cookie jar for a rainy day.

(b) Brenda records the money she has spent on gasoline this year.   

(c) Brenda buys a $100 Savings Bond.

(d) Brenda uses $2,400 to pay her rent.

2)

(a) Please provide a description of Bank Runs.

(b) Explain the main cause of Bank Runs.

(c) Why do you think we no longer see many Bank Runs today.

In: Economics

what does an increase or decrease in the following ratios have on the value of a...

what does an increase or decrease in the following ratios have on the value of a firm:

1. Cost of goods sold to sales

2. SGA to Sales

3.Gross Profit Margin

4. Asset Turnover

5. Days Sales Outstanding

6.Days sales of Inventory

7. Days Payable Outstanding

8. Inventory Turnover

9.Current Ratio

In: Finance

An asset has an average historical rate of return of 12.1 percent and a variance of...

An asset has an average historical rate of return of 12.1 percent and a variance of 0.01089091. What is the upper percentage range of returns would you expect to see approximately two-thirds of the time? (Round your answer to 2 decimal places. Omit the "%" sign in your response.)

In: Finance

Language: C++ In your main(), use printf() to print out the floating point values for some...

Language: C++
In your main(), use printf() to print out the floating point values for
   some hex data.
   a. To print 1.0, do
         printf("One:      %f\n",0x3FF0000000000000);
      The compiler will give you a warning about the argument being a different
      type than the format, but that is ok.
   b. To print 2.0, do
         printf("Two:      %f\n",0x4000000000000000);
      Remember, to multiply by two, you just add one to the exponent.
   c. Print 4.0, 8.0, and 16.0 (with nice labels, of course).
   d. We can also go the other way. To divide by two, just decreas the 
      exponent by one.  So for 1/2, do
         printf("Half:     %f\n",0x3FE0000000000000);
   e. Print 1/4, 1/8, 1/16.
   f. Negative values have a 1 in the leading bit instead of 0.  A leading 1
      in the bits for a hex digit has value 8, so -1.0 is BFF0000000000000.
      So to print -1.0, do
         printf("Neg One:      %f\n",0xBFF0000000000000);
   g. Print -2, -4, -8, -1/2, -1/4, -1/8 (with nice labels, of course).

In: Computer Science

*MUST SHOW WORK 1) What mass of hydrogen gas will be produced rom 4.76g of NO...

*MUST SHOW WORK

1) What mass of hydrogen gas will be produced rom 4.76g of NO and 3.23 g of CH4?

2NO(g)+2CH4(g)-->2HCN(g)+2H2O(g)+H2(g)


2) A 250.0g sample of a metal with a specific heat 0.95 J/g-C is heated to 80.0 C and then placed in a calorimeter with water. The initial temperature of the water is 19.0C and the final temperature of the system is 25.1 C. The heat loss to the calorimeter is negligible. What is the mass of the water?

3) Determine the volume and density of 45.0 g of ethane, C2H6, at STP.

4) A sample of sulfur dioxide occupies 12.0L at 258C and 1.27 psi. What volume will it occupy at STP?

In: Chemistry

Find the balance on the credit card after 3 months with the following information: APR =...

  1. Find the balance on the credit card after 3 months with the following information:

APR = 15.99%

Carry-Over balance for month 1 = $793.16

Minimum payment is $50 or 8%, whichever is greater

In: Accounting

In a BestFriendSimulation driver class, define and initialize a reference variable called myBestFriends referencing an ArrayList...

In a BestFriendSimulation driver class, define and initialize a reference variable called myBestFriends referencing an ArrayList ofBestFriend objects. Then, create a menu that will continue to display itself, and process the requests of the user, until the user requests to exit the menu (loop).

The menu should have 5 menu options:

1.) Add a BestFriend to the arrayList called myBestFriends; 2.) Change a BestFriend in the arrayList; 3.) Remove a BestFriend from the arrayList; 4.) Display all the objects in the myBestFriends arrayList. 5.) Exit

For each of these menu options, be sure to prompt the user for the necessary information such as BestFriend's first name, last name, nickname, and cell phone number.

Hint: In order to be able to change a BestFriend's information or remove a BestFriend from the arrayList, you will have to create a loop that will search the myBestFriends arrayList from beginning to end, and store the index position of the BestFriend that will be updated or removed. If the desired BestFriend is not found, a -1 will be returned from the search, or a not found flag will be set. If the BestFriend is found, use that index position to either change or remove that object from the myBestFriends arrayList.

Make sure you test each of your menu options, and then select the option that prints the table immediately afterwards, to ensure the PhoneBook looks correctly.

1. Create the BestFriend Domain Class
Define and/or instantiate the private static and non-static fields.

Create the constructor

public class BestFriend

{ private static int friendNumber = 0;

     private int friendIdNumber;

     private String firstName;

     private String lastName;

     private String nickName;

     private String cellPhoneNumber;

     public BestFriend (String aFirstName, String aLastName, String aNickName, String aCellPhoneNumber)

    {    firstName = aFirstName;

         lastName = aLastName;

         nickName = aNickName;

         cellPhoneNumber = aCellPhoneNumber;
friendNumber++;

friendIdNumber = friendNumber;

    }

    public String toString( )

    {   

         return friendIdNumber + ". " + nickName + " "  + firstName + " " + lastName + " " + cellPhoneNumber;

    }


Create the set methods (setters)
Create the get methods (getters)

public boolean equals(Object another)
{
      if (another instanceof BestFriend )
     {


     BestFriend anotherBFF = (BestFriend) another;
      if (firstName.equalsIgnoreCase(anotherBFF.firstName) &&
          lastName.equalsIgnoreCase(anotherBFF.lastName)
   //     && nickname.equalsIgnoreCase(anotherBFF.nickName) &&
   //      cellphone.equalsIgnoreCase(anotherBFF.cellPhone))
              return true;
}

         return false;

}





2. Create the BestFriendSimulation Driver Class:
Instantiate an arrayList  called myBFFs

Create a Do …… While loop to create a menu of 5 choices (add, change, remove, display, exit)
Allow the user to input the choice.
Use an if statement (or switch) to execute the user’s choice.

There are many ways to accomplish this task:

Technique #1.) Create a Helper class that defines the arrayList of BestFriends in its constructor, and then also defines the add, change, display, remove, and error methods as instance methods. Instantiate the Helper class from the driver (main) class. Also in the driver class, create the loop to display and process the menu options. When any specific menu option is selected, call the method from the Helper class.

Technique #2.) Instantiate the driver class in the main method (instantiate its own self). Then, define instance methods in the driver class for the add, change, display, remove, and error methods. Call them from the menu loop.

Technique #3.) In the driver class, create static methods for the add, change, display, remove, and error methods. Call them from the menu loop.

In any of the above 3 techniques, the arrayList of BestFriends can be defined as a global variable, so that it does not have to be passed as a parameter to each of the add, change, display, remove, and error methods. Similarly, the Scanner keyboard object should also be defined as a global variable too.

The alternative to defining the arrayList and Scanner keyboard as global variables is to pass these as parameters to each method call. For example:

addBFF(myBFFs, keyboard);

In: Computer Science