Questions
ANSWER IT IN PYTHON KINDLY ANSWER PROBLEM 2 AND 3. LEAVE PROBLEM 1 OUT. # General...

ANSWER IT IN PYTHON

KINDLY ANSWER PROBLEM 2 AND 3. LEAVE PROBLEM 1 OUT.

# General instructions:

'''

I suggest you to read the problem statements first and think how you can solve the problem. Think about your own way. Then check out the hints written as comments. After each hint there should be an empty line. Write your line of code in there to satisfy the comment (you may have to store the the value in a variable but that is not given as a hint).

You can use the if/else code blocks that i have given or get some idea from that. But you have to uncomment, fill the conditions, and choose the correct word if/elif/else).

Please discuss your thoughts and ideas with your group.

'''

#Keep the comments(#) and add additional comments when needed.

# Problem 1

# This problem will ask for the total grade(it should be in between 0 to 100 and an integer) and assign a letter grade for that.

# Grading scale: A: 90-100, B: 80-89, C: 70-79, D: 60-69, F: 0-59

# Ask for a grade between 0 to 100

# Convert it to integer

# if/else block

'''

if(#condition for getting A):

letterGrade = "A"

if or elif(#condition for getting B):

letterGrade = "B"

if or elif(#condition for getting C):

letterGrade = "C"

if or elif(#condition for getting D):

letterGrade = "D"

elif or else:

letterGrade = "F"

'''

#print the letter grade along with the given grade

# Problem 2

# This problem will ask for mode of operation of the calculator and two numbers(a, b). According to that it will perform a mathematical operation.

# Opertions to include addition, subtraction, multiplication, division, remainder

# Ask for the mode

# Ask for a

# Ask for b

# Convert a to float

# Convert b to float

# if/else block

'''

if(# condition for addition):

result = # operation for addition

if or elif(# condition for subtraction):

result = # operation for subtraction

if or elif(# condition for multiplication):

result = # operation for multiplication

if or elif(# condition for division):

result = # operation for division

if or elif(# condition for remainder):

result = # operation for remainder

elif or else:

assert mode == "error", "Operation not found"

'''

# Print out the mode of operation, two numbers and the result.

# Problem 3

# This problem will look ask fr three numbers: a, b, c. This will print out the largest number among them.

# Ask for a

# Ask for b

# Ask for c

# Convert a to float

# Convert b to float

# Convert c to float

# if/else block

'''

if(# condition for a being the largest):

largest = a

if or elif(# condition for b being the largest):

largest = b

elif or else:

largest = c

'''

# print out the three numbers and the largest number among them.

In: Computer Science

Read the following case and answer the question at the end: As Zappos made its push...

Read the following case and answer the question at the end:

As Zappos made its push toward holocracy, Hsieh decided to ramp up the efforts to an even higher level: Teal. Hsieh sent out a 4,700 word e-mail to all employees entitled “Reinventing Zappos: The Road to Teal.” Teal, supposed to be the next stage of development after holocracy, is characterized as “A new kind of organization designed to enable ‘whole’ individuals (not narrow professional selves) to self-organize and self-manage to achieve an organic organizational purpose.” In the memo, Hsieh essentially told the remaining employees to get on board or get out. Hsieh was not happy with the progress that had been made up to that point and wrote, “in order to eliminate the legacy management hierarchy, there will be effectively no more people managers.” John Bunch, the employee in charge of the move to teal says, “Teal is the goal; holocracy is the system.”
Hsieh even went as far as to offer the equivalent of three months’ worth of salary to employees who would quit the organization if they didn’t feel they could fit in. Over 200 employees (14 percent) took him up on the offer—a massive number of people given Zappos’s normal turnover rate of 1 percent annually. Clearly, not everyone felt comfortable in an organization with no clear leadership structure and very little to no legitimate power. One departed employee called holocracy “a social experiment [that] created chaos and uncertainty.” Others felt like “more employees are feeling like favoritism [and management issues are] becoming a bigger problem.” CEO Tony Hsieh remains undaunted. Hsieh says, “The one thing I’m absolutely sure of is that the future is about self-management.”
The move has not been bad for everyone. Less experienced individuals with less expertise have felt energized by their ability to speak up and have a voice. One employee whose prior boss blocked a job transfer stated that as soon as he figured holocracy out, “I was like, ‘Actually, my boss can’t tell me that.’” Jake McCrea, who teaches new hires about Zappos culture, states, “Holacracy is like a sport or a new language. You can read about it, you can hear people tell you about it, you won’t understand it until you start using it.” Even through all the issues, Hsieh stated, “I’ve been surprised at how hard it is to let go of the psychological baggage. In retrospect, I would have probably ripped off the Band-Aid sooner.”

Can an organization run effectively without leaders having some form of organizational power?

In: Psychology

Problem A. A part of the code has been given below: ldd         $4000 ldx         $4002               &nb

Problem A.

A part of the code has been given below:

ldd         $4000
ldx         $4002
                                                                   idivs
                                                                   stx         $4005
                                                                   std         $4008

What does this code do? Include specific comments on each line of the code.
State the addressing mode of each instruction above.

Problem 2.

What does the following program doing. Rewrite the code and insert the comment field

org         $2000
ldaa       $1500
                                                                   adda
                                                                   stx         $4005
                                                                   std         $4008

Problem 3.
Convert the following numbers to decimal:

(a) 1001002   =
                     (b) 2 B91 =

Problem 4.
Convert the following numbers to Hexadecimal:
  
a.       1   2310 =
b.   10000012
Problem 6.
Write a procedure, assembly code, that clears the memory locations of $1000, $1001 and $1002 and transfer the values of memory location $1008, $1009, and $1010 onto them in respective order.
Problem 7.
   •   How many address lines are needed to address each memory location in a 2048 x 4 memory chip?
a. 10
b. 11
c. 8
d. 12
     2. The octal equivalence of 111010 is
a. 81
b. 72
c. 71
d. None of above
   •   The most commonly used standard data code to represent alphabetical, numerical and punctuation characters used in electronic data processing system is called
a. ASCII
b. EBCDIC
c. BCD
d. All of above

   •   The Width of a processor’s data path is measured in bits. Which of the following is not a common data path width? State the reason in a sentence
a. 8 bits
b. 12 bits
c. 16 bits
d. 32 bits
   •   The word length of a computer is measured in
a. Bytes
b. Millimeters
c. Meters
d. Bits
   •   The left side of any binary number is called:
a. Least significant digit
b. Most significant digit
c. Medium significant digit
d. low significant digit
   •   A nibble can be represented in the form of:
a.                   Octal digit
b.                  Decimal
c.                   Hexadecimal
d.                  None of these

Problem 8.
Explain the following sets of instructions and what will be the outcome?
org      $2000;
Ldd     $1502;
Subd   $1506;
Std      $1501;

Ldaa   $1501;
Sbca   $1505;
Staa    $1511;

Ldaa   $1500;
Sbca    $1504;
Staa     $1510;
End    
Problem 9.
Write a program to add numbers stored in memory locations $ 2000, $2001, $2002 and save the result in memo $2010.
Problem 10.
Write a program to subtract the contents of the memory locations at $1005 from the sum of the memory locations at $1000 and $1002, and store the difference at $1010. Then, show the flow chart of the program ( include the comments).

In: Computer Science

Transcript Boy Sells Hot Cocoa to Benefit Hospital That Saved Friend’s Life LESTER HOLT, anchor: If...

Transcript
Boy Sells Hot Cocoa to Benefit Hospital That Saved Friend’s Life
LESTER HOLT, anchor:
If your winter has been anything like ours, it's a perfect night for a cup of hot chocolate, the ultimate
comfort food. It's become the ultimate expression of friendship between two little boys in Colorado when
one of them faced the greatest challenge of his young life. With help from our Denver affiliate KUSA, we
get the story tonight from NBC's Joe Fryer.
JOE FRYER, reporting:
Denver in the winter is no place for a lemonade stand.
TRISTAN REGINI: And this is really cold right now.
FRYER: Which is why eight-year-old Tristan Regini is selling hot cocoa, a buck a cup. Two bucks if you
like marshmallows.
WOMAN #1: Could I have hot cocoa with the five marshmallows?
REGINI: Okay.
FRYER: With such low temps, investment analysts might scowl at such an icy escapade.
REGINI: It can be very tough.
FRYER: Until they hear Tristan's real business plan.
REGINI: My friend Cade, he had cancer.
FRYER: Tristan's talking about his buddy, Cade Humphrey, who was diagnosed with brain cancer. After
surgery, chemo, radiation and a bone marrow transplant, there's now no sign of Cade's disease.
REGINI: Children's Hospital saved his life. So now I'm trying to sponsor it even more.
FRYER: As word of Tristan's ongoing fundraiser has spread, donations have grown.
MAN: That's great. Nice of you to do this.
FRYER: This week he gave four hundred dollars to Children's Hospital Colorado, and more money is still
coming in. His parents are not surprised.
STEVE REGINI: It's pretty much Tristan, that's just the way he is.
WOMAN #2: I'll be right back.
FRYER: In this frozen neighborhood, it is not the hot cocoa that will warm your heart.
REGINI: I want to just save some lives.
FRYER: It's the salesman.
REGINI: Hot chocolate for sale.
FRYER: Joe Fryer, NBC News.

Discuss Tristan Regini's desire to create a business?
Tristan Regini had to make decisions or choices about his business such as: what to sell. Discuss other decisions or choices he made as an entrepreneur?
Discuss how creating a business helped Tristan Regini achieve his goals. Your answer should categorize the choices (i.e., personal, professional, and financial goals).

In: Economics

4-5. List the junior level COSC courses (like COSC3xxx) and the name of the course. Use...

4-5. List the junior level COSC courses (like COSC3xxx) and the name of the course. Use the Course table.


4-6. Using the COUNT feature, determine whether there are duplicate names or student numbers in the Student table.


4-7. Assume all math courses start with MATH. How many math courses are there in the Section table? From the COUNT of courses, does it appear there are any math courses in the Section table not in the Course table? Again, using COUNTs, are there any math courses in the Course table not in the Section table? Does it appear there are any courses at all in the Grade_report, Section, or Course tables not in the others? (We will study how to ask these questions in SQL in a later chapter). A query like the following would not work:

SELECT g.section_id

FROM Grade_report g, Section t

WHERE g.section_id <> t.section_id;
Explain why WHERE .. <> .. will not work to produce the desired output.


4-8. Display dictionary views for the tables we have in the Student-Course database (refer to the diagram in Appendix 3 for all the table names). Use “All_tables” as the dictionary view. Do the query as follows:

a. DESCRIBE the table with DESC All_tables;

b. Display the number of rows in All_tables. Use SELECT COUNT(*) FROM All_tables; When you are exploring the dictionary, it is not a good idea to simply SELECT * FROM whatever, where whatever is some dictionary view. Dictionary views are often long and wide --wide because there are often many attributes and many of those attributes are not necessarily interesting.


c. Display the owner and table_name from All_tables where owner = ‘your userid’.

CREATE THE TABLE FOR only for Student, GradeReport, and Section QUESTION 4-9.

4-9. For all the tables in the Student-Course database --Student, Grade_report, Section, Room, Course, Prereq, Department_to_major, list the attributes, number of rows, number of distinct rows, and number of rows without nulls. As you gather the information, put the information in a tabular format, as shown below (Note, you may want to create this table in your word processor as you gather the information.)
Table Attribute Rows Distinct Rows Rows without Nulls Student stno
48
sname major
class Section section_id etc.
Also, there is probably no “one” query to give you this information. You will have to fi nd this information using separate queries, and then put the information together in a tabular format. Hint: You can use:
SELECT COUNT (*) FROM Student WHERE sname IS NULL

In: Computer Science

So far in this course, all of your programs have been written to be fully contained...

So far in this course, all of your programs have been written to be fully contained inside a single method named main. The main method is where Java begins execution of your program. In this assignment, you will coding other methods in addition to the main method. These additional methods will perform specific functions and, in most cases, return results. Write all your methods in a class named Homework6Methods.java

  1. Write a public static method named getMaxOf2Ints that takes in 2 int arguments and returns the Maximum of the 2 values
  2. Write a public static method named getMinOf2Ints that takes in 2 int arguments and returns the Minimum of the 2 values
  3. Write apublic static method named getMaxOf3Ints that takes in 3 int arguments and returns the Maximum of the 3 values
  4. Write a public static method named getMedianOf3Ints that takes in 3 int arguments and returns the Median Value of the 3 values
  5. Write a public static method named printMinOf3Ints that takes in 3 int arguments of type int and prints the minimum value of those 3 ints Example: “The min is “ + minVal
  6. Write a public static method named getProdOfAllPositiveInts that takes in 1 int argument and returns the product of all the values between 1 and that number. If the argument is NON-positive return 0
  7. Write a public static method named getProdOfAllNegativeInts that takes in 1 int argument and returns the product of all the values between -1 and that number. If the argument is NON-negative return 0
  8. Write a public static method named isProdOfAllNegativeIntsNegative that takes in 1 int argument and returns true if the product of all the values between -1 and that number is negative, and false otherwise.
  9. Write a public static method named getCharAtIndex that takes in 2 arguments, a String s, and an int index. The method should return the char found at the index location of the string or if not found return a ‘?’
  10. Write a public static method named getCountOfCharInString that takes in 2 arguments, a String s, and a char c. The method should return an int representing the number of times the char was found within the string.
  11. Write a public static method named getStringReversed that takes in 1 argument of type String and returns the String in reverse order.
  12. Write a public static method named getStringTitleCased that takes in 1 argument of type String and capitalizes the first letter of each word in the String, then returns the title cased string. Example: Input: “the dog ate my homework!” Returns: “The Dog Ate My Homework!”

In: Computer Science

Visual Basic This assessment will cover the Programming fundamentals of the Integrated Development Environment(IDE) found in...

Visual Basic

This assessment will cover the Programming fundamentals of the Integrated Development Environment(IDE) found in Chapters 1-7 of the assigned text. In this assignment, you will demonstrate the use of tools explored so far within the course. It is the High Totals Game activity found in the Case Projects section of your book. Requirements: Copy/paste the VB code into a Microsoft Word document. You are also required to submit enough screenshots of the output to show that all work has been completed.

Create an application that can be used to practice adding, subtracting, multiplying, and dividing numbers. The application should display a math problem on the screen and then allow the student to enter the answer and also verify that the answer is correct. The application should give the student as many chances as necessary to answer the problem correctly. The math problems should use random integers from 1 through 20, inclusive. The subtraction problems should never ask the student to subtract a larger number from a smaller one. The division problems should never ask the student to divide a smaller number by a larger number. Also, the answer to the division problems should always result in a whole number. The application should keep track of the number of correct and incorrect responses made by the student. The interface should include a button that allows the user to reset the counters for a different student.

The High Total game requires two players. The application’s interface should allow the user to enter each player’s name. When the user clicks a button, the button’s Click event procedure should generate two random numbers for player 1 and two random numbers for player 2. The random numbers should be in the range of 1 through 20, inclusive. The procedure should display the four numbers in the interface. It should also total the numbers for each player and then display both totals in the interface. If both totals are the same, the application should display the message “Tie”. If player 1’s total is greater than player 2’s total, it should display the message “player 1’s name won”. If player 2’s total is greater than player 1’s total, it should display the message “player 2’s name won”. The application should keep track of the number of times player 1 wins, the number of times player 2 wins, and the number of ties. The interface should also include a button that allows the user to reset the counters and interface for a new game.

In: Computer Science

Assignment Steps Resources: Microsoft ExcelÂŽ, Signature Assignment Databases, Signature Assignment Options, Part 3: Inferential Statistics Scenario:...

Assignment Steps Resources: Microsoft ExcelÂŽ, Signature Assignment Databases, Signature Assignment Options, Part 3: Inferential Statistics Scenario: Upon successful completion of the MBA program, say you work in the analytics department for a consulting company. Your assignment is to analyze one of the following databases: Manufacturing Hospital Consumer Food Financial Select one of the databases based on the information in the Signature Assignment Options. Provide a 1,600-word detailed, statistical report including the following: Explain the context of the case Provide a research foundation for the topic Present graphs Explain outliers Prepare calculations Conduct hypotheses tests Discuss inferences you have made from the results This assignment is broken down into four parts: Part 1 - Preliminary Analysis Part 2 - Examination of Descriptive Statistics Part 3 - Examination of Inferential Statistics Part 4 - Conclusion/Recommendations Part 1 - Preliminary Analysis (3-4 paragraphs) Generally, as a statistics consultant, you will be given a problem and data. At times, you may have to gather additional data. For this assignment, assume all the data is already gathered for you. State the objective: What are the questions you are trying to address? Describe the population in the study clearly and in sufficient detail: What is the sample? Discuss the types of data and variables: Are the data quantitative or qualitative? What are levels of measurement for the data? Part 2 - Descriptive Statistics (3-4 paragraphs) Examine the given data. Present the descriptive statistics (mean, median, mode, range, standard deviation, variance, CV, and five-number summary). Identify any outliers in the data. Present any graphs or charts you think are appropriate for the data. Note: Ideally, we want to assess the conditions of normality too. However, for the purpose of this exercise, assume data is drawn from normal populations. Part 3 - Inferential Statistics (2-3 paragraphs) Use the Part 3: Inferential Statistics document. Create (formulate) hypotheses Run formal hypothesis tests Make decisions. Your decisions should be stated in non-technical terms. Hint: A final conclusion saying "reject the null hypothesis" by itself without explanation is basically worthless to those who hired you. Similarly, stating the conclusion is false or rejected is not sufficient. Part 4 - Conclusion and Recommendations (1-2 paragraphs) Include the following: What are your conclusions? What do you infer from the statistical analysis? State the interpretations in non-technical terms. What information might lead to a different conclusion? Are there any variables missing? What additional information would be valuable to help draw a more certain conclusion?

In: Math

Instructions: Answer the following questions. Submit your answers to questions 1-5 as a Rich Text Format...

Instructions:

Answer the following questions. Submit your answers to questions 1-5 as a Rich Text Format le (.rtf), Word document (.doc), or ASCII text le (.txt). For problem 6 submit an excel sheet containing your chart.

4. (40 points) Determine the number of statement executions (precise big-Oh) for each of the following sample code, as described in the lecture. Your answers should be in the form of a Big-Oh polynomial (e.g., O(3N2 + 7N + 6)).

Sample #1:

for (int i = 0; i < n; i++)

{

   sum += i;

}

int j = 0;

while (j < n)

{

    sum--;

    j++;

}                        

*************************************************************

Sample #2:

int sumi=0;

int sumj;

int sumk;

for (int i=0; i< n; i++)

{

   sumi++;

   for (int j =0; j< i; j++)

{

sumj++;

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

sumk++

}

}

*****************************************************

Sample #3

int sum=0;

for (int i=0; i<n; i++)   

if (i % 2 =0)

sum++;    //% is the modulo operation

*****************************************************

Sample #4:

for (int i = 0; i < n; i++)

{

   sum += i;  

}

for (int j = 0; j < n; j++)

{

    for (int k = 0; k < n; k++)

   {

    sum--;

   }

}                             

***************************************************************

Sample #5:

for (int i = 0; i < n; i++)

{

for (int j = 0; j < n; j++)

{

      for (int k = j; k < n; k++)

      {

        sum += j;         

      }

   }                   

}

************************************************************************

   

5. (16 points) determine the order of magnitude for method 1 implemented in java as below. This method sorts an array of integers in a descending order. Unlike the previous question, you do not need to count the total number of statement executions to come up with a precise big-Oh; instead, you can use the shortcut rules covered in the lecture for computing the big-Oh. Notice that method 1 includes a statement that calls method 2.

     public static void method1(int[] array, int n)

      {

          for (int index=0; index<n ; index++ )

          {     

                 int mark = method2(array, index, n-1);

                 int temp= array[index];

                 array[index] = array[mark];

                 array[mark] = temp;

           }

       }

      

       public static int method2(int[]array, int first, int last)

       {

              int max= array[first];

              int indexOfMax= first;

              for (int index=first+1; index<=last; index++)

                     if(array[index]>max)

                     {

                           max= array[index];

                           indexOfMax = index;

                     }

              return indexOfMax;

       }

In: Computer Science

Implement the following functions. Each function deals with null terminated C-strings. You can assume that any...

Implement the following functions. Each function deals with null terminated C-strings. You can assume that any char array passed into the functions will contain valid, null-terminated data. Your functions must have the signatures listed below.

1. This function returns the last index where the target char can be found in the string. it returns -1 if the target char does not appear in the string. For example, if s is “Giants” and target is ‘a’ the function returns 2.

int lastIndexOf(char *s, char target)

2. This function alters any string that is passed in. It should reverse the string. If “flower” gets passed in it should be reversed in place to “rewolf”. To be clear, just printing out the string in reverse order is insufficient to receive credit, you must change the actual string to be in reverse order.

void reverse(char *s)

3. This function finds all instances of the char ‘target’ in the string and replaces them with ‘replacementChar’. It also returns the number of replacements that it makes. If the target char does not appear in the string it returns 0 and does not change the string. For example, if s is “go giants”, target is ‘g’, and replacement is ‘G’, the function should change s to “Go Giants” and return 2.

int replace(char *s, char target, char replacementChar)

4. This function returns the index in string s where the substring can first be found. For example if s is “Skyscraper” and substring is “ysc” the function would return 2. It should return -1 if the substring does not appear in the string.

int findSubstring(char *s, char substring[])

5. This function returns true if the argument string is a palindrome. It returns false if it is not. A palindrome is a string that is spelled the same as its reverse. For example “abba” is a palindrome. So is “hannah”, “abc cba”, and “radar”.

bool isPalindrome(char *s)

Note: do not get confused by white space characters. They should not get any special treatment. “abc ba” is not a palindrome. It is not identical to its reverse.

6. (OPTIONAL). This function should reverse the words in a string. A word can be considered to be any characters, including punctuation, separated by spaces (only spaces, not tabs, \n etc.). So, for example, if s is “The Giants won the Pennant!” the function should change s to “Pennant! the won Giants The”

void reverseWords(char *s)

Requirements

- You may use strlen(), strcmp(), and strncpy() if you wish, but you may not use any of the other C-string library functions such as strstr(), strncat(), etc.

- You will not receive credit for solutions which use C++ string objects, you must use C-Strings (null-terminated arrays of chars) for this assignment.

Please provide a sample output. thank you.

In: Computer Science