Questions
You have a theory that certain days of the week are most likely to be the...

You have a theory that certain days of the week are most likely to be the highest sales You are to write a program that will test that theory.

Write a program that will have a list of 52 lists, each of those 52 lists must be of length 7 (that is they will each accommodate 7 items). Think of 52 weeks with 7 days in each week. Save a random value from 70 - 100 (inclusive of 70, exclusive of 100) in each of the days of each of the weeks.

Your code should analyze the list above and print a list of the number of times each day of the week had the highest sales. If more than one day had the highest sales of the week I do not care which of those days is recorded as the highest sales day.

Here is an example of the expected output: note that in the example below I generated and analyzed 5 weeks, you are to generate and analyze 52 weeks:

My code generated and output the following list of lists:

[[93, 98, 95, 75, 81, 88, 97], [91, 76, 81, 84, 72, 97, 83], [91, 81, 75, 72, 92, 95, 79], [98, 93, 88, 74, 93, 97, 82], [77, 86, 90, 87, 75, 84, 95]]

And output the following list after analysis of the above list:

[1, 1, 0, 0, 0, 2, 1]

The actual output from running my code was:

RESTART: /Users/janetbrownsederberg/Stonehill/Stonehill_Fall2020/HighestSales.py

[[93, 98, 95, 75, 81, 88, 97], [91, 76, 81, 84, 72, 97, 83], [91, 81, 75, 72, 92, 95, 79], [98, 93, 88, 74, 93, 97, 82], [77, 86, 90, 87, 75, 84, 95]]

[1, 1, 0, 0, 0, 2, 1]

>>>

Please have your output in the form above.

Please done in Python format

In: Computer Science

Describe how the Hypertext Markup Language (HTML) and Extensible Markup Language (XML) would be utilized in...

Describe how the Hypertext Markup Language (HTML) and Extensible Markup Language (XML) would be utilized in relation to your e-business and the related user Web interfaces. Also indicate the relationship between XML and the Extensible Business Reporting Language (XBRL). How do you envision using XBRL in relation to your e-business? Finally, what role does XML play in the Semantic Web project discussed in this module?

In: Computer Science

An operating system uses the Round Robin (RR) without priority CPU scheduling algorithm, with a quantum...

An operating system uses the Round Robin (RR) without priority CPU scheduling algorithm, with a quantum = 4.

Consider the following set of processes in this OS, with the length of the CPU burst time given in milliseconds, and the shown priority.

The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0.

Process Burst Time Priority
P1 5 2
P2 10 5
P3 4 1
P4 6 4
P5 9 3

a) Draw a Gantt chart illustrating the order of execution of these processes, showing their completion times.

b) Calculate each process’ waiting time, and then compute the average waiting time for this set.

Note:  waiting time = completion time – arrival time – burst time

=> Write your answers on scratch paper (make sure it is visible) then take a picture of it and upload it here.

In: Computer Science

1. In R Studio create a plot with two subplots (2 rows, 1 column): a). Display...

1. In R Studio create a plot with two subplots (2 rows, 1 column):

a). Display five Gaussian pdf curves for the six mean/standard deviation pairs (0, 1), (0, 2), (0, 3), (1, 1), (1, 2), (1.3) in the upper subplot using distinct colors for each curve.
b). Repeat the same procedure for corresponding cdfs in the lower plot.

In: Computer Science

apply following to body of the page in css format 1. background color of rgb(145,215,170) 2....

apply following to body of the page in css format

1. background color of rgb(145,215,170)


2. width to 65% of the page

3. center the body using the margin property

4. assign a font family of Georgia, Times, serif

In: Computer Science

Should you be bought and sold or not.... a). What constraints should there be on the...

Should you be bought and sold or not....

a). What constraints should there be on the gathering of information on users? With or without their permission? If with their permission, opt-in or opt-opt? b). How about exchanging the information that has been gathered? Any constraints on the use of that data?

In: Computer Science

Apply following to header and footer sections of page in css center text background color rgb(254,198,179)...

Apply following to header and footer sections of page in css

center text

background color rgb(254,198,179)

padding should be 20px

In: Computer Science

The following program uses Pthreads to create two threads. They do some work for the process...

The following program uses Pthreads to create two threads. They do some work for the process and then exit. The process then outputs a result.

Assume all supporting libraries and other functions have been included.

=> Use the answer text field to describe what work (operations) the threads are doing, and what kind of result (what is it?) is output by the process.

#include <pthread.h>

#include <stdio.h>

#include <stdlib.h>

int res1, res2, a[100], b[100];

void *runner1(void *param);

void *runner2(void *param);

void readData(int []);


int main(int argc, char *argv[])

{

  pthread_t tid1, tid2;

  pthread_attr_t attr;


  readData(a);

  readData(b);

  pthread_attr_init(&attr);

  pthread_create(&tid1, &attr, runner1, argv[1]);

  pthread_create(&tid2, &attr, runner2, argv[1]);

  pthread_join(tid1,NULL);

  pthread_join(tid2,NULL);

  printf("result = %d\n", res1+res2);

}

void *runner1(void *param)

{

  int i, upper = atoi(param);

  res1 = 0;

  for (i = 0; i < upper; i++)

    res1 += a[i];

  pthread_exit(0);

}

void *runner2(void *param)

{

  int i, upper = atoi(param);

  res2 = 0;

  for (i = 0; i < upper; i++)

    res2 += b[i];

  pthread_exit(0);

}

In: Computer Science

execute coding examples that demonstrate the 4 scope rules file,function,class,block coding language c++

execute coding examples that demonstrate the 4 scope rules

file,function,class,block

coding language c++

In: Computer Science

1. Read a line of input from the user (as a string) and find out if...

1. Read a line of input from the user (as a string) and find out if there are any vowels in the string. Use a break or continue keyword (whichever is appropriate) to notify that a vowel has been found. Prompt for another string and search again until the user enters 'exit' into the program.

2. Ask the user how many random numbers they would like to see. Ask the user to provide the lowest number they would like to use and the highest number. Only return integers between those two numbers.

Java language

In: Computer Science

Based on the following Python code, write a Python statement which outputs “December” when the value...

Based on the following Python code, write a Python statement which outputs “December” when the value of the Month is 12 or “November” when the value of the Month is 11 or “Neither” when value of the Month is neither 11 or 12. The user enters the value which is store in the variable namedMonth.

Month = int(input("Please enter the value of the month in numerical format such as 11 for November, or 12 for December: " ))

sing Python

In: Computer Science

write a c++ program Find an algorithm and show the codes for evaluating the number of...

write a c++ program

Find an algorithm and show the codes for evaluating the number of numbers between 200 and 1000 that are divisible by 2 and 7

In: Computer Science

the language that suggested is java - Given the following sorting techniques, that uses the algorithmic...

the language that suggested is java

- Given the following sorting techniques, that uses the algorithmic design techniques of Induction and Divide and Conquer paradigm:

a. Quicksort using pivot as the maximum element

b. Quicksort using a random pivot element

c. Quicksort using a pivot as the median element (Finding pivot in linear time)

d-insertion sort

e- merge sort

Perform the following tasks: A. Write the algorithm for each technique. B. Implement the code for each technique. C. Test your implemented code using the test cases provided in the next section. D. Compare the performance with respect to the time complexity of these algorithms against each other using the empirical results obtained in the previous task by plotting charts. E. Provide a technical analysis about the time complexity of these problems by using the charts from the previous task.

Input Cases: Problem instance size (n) a) For each technique, the size of n varies as 100, 1000, 10000, 100000 For each problem instance size, distinct input values should be randomly generated using the following specifications: b) Generate distinct random values between the range of: i. 1 and 500 ii. 100 and 1000 iii. 5000 and 100000 As such, for each problem you will have 12 executions (4 problem instance size each having 3 different input value generation range)

how to perform showing Analysis:
you will plot a single multi-line chart. The ticks on the x-axis will represent each problem instance size
and y-axis will represent a count of the number of comparisons performed for each technique given a
problem instance size. The series in these line charts will represent the different sorting techniques you
have implemented. Use values generated between the range of 5000 to 100000 for each problems’
problem instance size.

In: Computer Science

How could this be implemented in C? binstring[] = 1011001000010110000100010100110010010101101100011101000110010000100010100110010010101101100011101101000010001010011001001010110110001110001010011001001111100001000100010001000100010001 ~ 160 characters lon

How could this be implemented in C?

binstring[] = 1011001000010110000100010100110010010101101100011101000110010000100010100110010010101101100011101101000010001010011001001010110110001110001010011001001111100001000100010001000100010001

~ 160 characters long divided into groups of 5 ~

This function takes a starting position and the array of ‘1’ and ‘0’ and returns the character

representation of the five bits at that location.

    char byte_at( int position, const char binstring[] ) {

        }

In: Computer Science

Given a string sentence that consists of some words separated by a single space, and a...

Given a string sentence that consists of some words separated by a single space, and a string searchWord.

Write a function isPrefix to check if searchWord is a prefix of any word in sentence. A prefix of a string S is any leading contiguous substring of S. It returns the index of the word in sentence where searchWord is a prefix of this word (1-indexed).

If searchWord is a prefix of more than one word, return the index of the first word (minimum index). If there is no such word return -1.

Input: sentence = this problemo is an easy problemo, searchWord = pro

Output: 2

Explanation: pro is prefix of problemo which is the 2nd and the 6th word in the sentence, but we return 2 as it's the minimal index.

In: Computer Science