Do you think that dealing with big data demands high ethical regulations, accountability, and responsibility of the person as well as the company? Why​

Answers

Answer 1

Answer:

i will help you waiting

Explanation:

Answer 2

Yes dealing with big data demands high ethical regulations, accountability and responsibility.

The answer is Yes because while dealing with big data, ethical regulations, accountability and responsibility must be strictly followed. Some of the principles that have to be followed are:

Confidentiality: The information contained in the data must be treated as highly confidential. Information must not be let out to a third party.Responsibility: The people responsible for handling the data must be good in analyzing big data. They should also have the required skills that are needed.Accountability: The service that is being provided has to be very good. This is due to the need to keep a positive work relationship.

In conclusion, ethical guidelines and moral guidelines have to be followed while dealing with big data.

Read more at https://brainly.com/question/24284924?referrer=searchResults


Related Questions

Write code that sets the value of a variable named delicious to True if jellybeans is greater than 20, or licorice is greater than 30, or their sum is greater than 40. Otherwise, set it to False. Do NOT use an if statement in your solution. Assume jellybeans and licorice already have values.

Answers

Answer:

jellybeans = 10

licorice = 35

delicious = (jellybeans > 20) or (licorice > 30) or ((jellybeans + licorice) > 40)

print(delicious)

Explanation:

*The code is in Python.

Set the jellybeans and licorice to any values you like

In order to have the value of True or False without using the if statement, we need to set delicious as boolean variable. As you may know, boolean variables are the variables that have a value of either True or False

Check if jellybeans is greater than 20 or not → (jellybeans > 20)

Check if licorice is greater than 30 or not → (licorice > 30)

Check if their sum is greater than 40 or not → ((jellybeans + licorice) > 40)

All of the above expressions are boolean expressions. They return True if the statement is correct. Otherwise, they return False

Also, note that we combined all the expressions with or

For these values → jellybeans = 10, licorice = 35:

The first statement returns False

The second statement returns True

The third statement returns True

delicious = False or True or True → True

Note that if the expressions are combined with or, the result will be True if one of the expression is True.

The code that sets the value of a variable named delicious to True if jellybeans is greater than 20, or licorice is greater than 30, or their sum is greater than 40 is as follows:

jellybeans = 30

licorice = 35

delicious = (jellybeans > 20) or (licorice  > 30) or (jellybeans + licorice > 40)

print(delicious)

Code explanationThe first line of code, we declared a variable called jellybeans and initialise it to 30.The second line of code, we declared a variable called licorice and initialise it to 35.Then the variable "delicious" is used to store the condition if jelly fish is greater than 20 or if licorice is greater than 30 or the sum of licorice and jellyfish is greater than 40 If any of the condition is true, the print statement will print out True else it will print False.

learn more variable here : https://brainly.com/question/19661456?referrer=searchResults

This feature in Word Online allows you to view your document to see what it will look like when printed.

Open
Print Preview
Save
Sneak Preview

Answers

Answer:

Print preview allows you to view your document before printing

Answer: they are correct, the answer is print preview! (i did the quiz)

Explanation:

you can give them brianliest now!

Objective
Make a function that solves the quadratic equation, outputting both values of X. You do not have to worry about imaginary numbers. That is, I will only use input that creates a real output (such as the example screenshots).
NOTE: A function that uses the C version of pass by reference is required to get full credit on this assignment. The C++ form of pass by reference will receive no credit.
Details
STEP 1
#include at the top of your file so that you can use the sqrt function. The sqrt function calculates the square root. For example:
int x = sqrt(9.0)
Will leave x with the value 3, which is the square root of 9.
STEP 2
Define a function THAT USES PASS BY REFERENCE to take in three double inputs and provides two double outputs. In the equations below I use a, b, and c as the double input names and x1 and x2 as the output names.
Inside this function solve the quadratic equation for both possible values of x:
X 1 = − b + b 2 − 4 a c 2 a
That is, X1 is equal to -b + sqrt(b * b - 4 * a * c) then divide all of that by 2 * a.
X 2 = − b − b 2 − 4 a c 2 a
That is, X2 is equal to -b - sqrt(b * b - 4 * a * c) then divide all of that by 2 * a.
Note the difference. One adds sqrt(b * b - 4 * a * c) and the other subtracts it.
This can be done in several lines of code if you want or you can attempt to perform the entire calculation in one line of code.
STEP 3
In the main function read in 3 inputs from the user. Pass these inputs to the quadratic equation function along with the pass by reference variables for the output. Print the results to the screen.
Advice
Your quadratic equation function does NOT need to account for imaginary numbers. Stick with the example inputs to test your code.
If you get NAN that means your equation has an imaginary solution. Do not worry about it. Try different inputs.
The calculation itself is a minor portion of this grade. The majority of the grade comes from implementing pass by reference so make sure you have that part correct.
b2 is simple enough that you do not need to call the pow() function to calculate the power. Instead multiply b * b.
You may want to calculate the numerator into one variable and the denominator into another. You don't have to solve the entire equation on one line (though that is possible).
Since you are using pass by reference you can make the QuadraticEquation function into a void function. It does not need to return anything since it is returning calculations via pointers.
Use scanf on one variable at a time. Don't forget to use double data types and %lf with scanf.

Answers

Answer:

In C

#include <stdio.h>

#include<math.h>

void myfunc(double *a, double *b, double *c) {

  double x1, x2;

  x1 = (-(*b) + sqrt((*b)*(*b)- 4*(*a)*(*c)))/(2*(*a));

  x2 = (-(*b) - sqrt((*b)*(*b) - 4*(*a)*(*c)))/(2*(*a));

  printf("x1 = %f\n",x1);

  printf("x2 = %f\n",x2);}

int main () {

  double a,b,c;

  printf("a: "); scanf("%lf", &a);

  printf("b: "); scanf("%lf", &b);

  printf("c: "); scanf("%lf", &c);

  myfunc(&a, &b, &c);

  return 0;}

Explanation:

#include <stdio.h>

#include<math.h>  --- This represents step 1

Step 2 begins here

This gets the values of a, b and c from main by reference

void myfunc(double *a, double *b, double *c) {

This declares x1 and x2

  double x1, x2;

Calculate x1

  x1 = (-(*b) + sqrt((*b)*(*b)- 4*(*a)*(*c)))/(2*(*a));

Calculate x2

  x2 = (-(*b) - sqrt((*b)*(*b) - 4*(*a)*(*c)))/(2*(*a));

Print x1

  printf("x1 = %f\n",x1);

Print x2

  printf("x2 = %f\n",x2);}

Step 3 begins here

int main () {

Declare a, b and c as double

  double a,b,c;

Get input for a, b and c

  printf("a: "); scanf("%lf", &a);

  printf("b: "); scanf("%lf", &b);

  printf("c: "); scanf("%lf", &c);

Call the function to calculate and print x1 and x2

  myfunc(&a, &b, &c);

  return 0;}

This is computer and programming

Answers

Answer:yes

Explanation:because

up to 25 miles i think sorry is wrong

helpppp me please..
........​

Answers

Answer:

The employer's monthly salary (X)

Write a SELECT statement that uses aggregate window functions to calculate the order total for each customer and the order total for each customer by date. Return these columns: The customer_id column from the Orders table The order_date column from the Orders table The total amount for each order item in the Order_Items table The sum of the order totals for each customer The sum of the order totals for each customer by date (Hint: You can create a peer group to get these values)

Answers

Answer:

1. SELECT Order.customer_id, SUM(order_total) AS 'Total_order'  

FROM Order JOIN Order_item

WHERE Order.customer_id = Order_item.customer_id

GROUP BY Order.customer_id

2. SELECT Order.customer_id, SUM(order_total) AS 'Total_order' , order_date

FROM Order JOIN Order_item

WHERE Order.customer_id = Order_item.customer_id

GROUP BY Order.customer_id, Order_item.order_date

ORDER BY Order_item.order_date

Explanation:

Both SQL queries return the total order from the joint order and order_item tables, but the second query returns the total order and their data grouped by customer and order date and also ordered by the order date.

Recall that within the LinkedCollection the numElements variable holds the number of elements currently in the collection, and the head variable of type LLNode holds a reference to the beginning of the underlying linked list. The LLNode class provides setters and getters for its info and link attributes. Complete the implementation of the add method:

public boolean remove (T target)
// Removes an element e from this collection such that e.equals (target)
// and returns true; if no such element exists, returns false.
find(target);
if (found)
// complete the method body
return found;

Answers

yeah its totally rghe 5fith ob dExplanation:

2. Write a Python regular expression to replace all white space with # in given string “Python is very simple programming language.”

Answers

Dear Parent, Please note that for your convenience, the School Fee counter would remain open on Saturday,27th March 2021 from 8am to 2 pm. Kindly clear the outstanding amount on account of fee of your ward immediately either by paying online through parent portal or by depositing the cheque at the fee counter to avoid late fee charges.For payment of fee the following link can also be used Pay.balbharati.org

37) Which of the following statements is true
A) None of the above
B) Compilers translate high-level language programs into machine
programs Compilers translate high-level language programs inton
programs
C) Interpreter programs typically use machine language as input
D) Interpreted programs run faster than compiled programs​

Answers

Answer:

B

Explanation:

its b

Answer:

A C E

Explanation:

I got the question right.

Consider the following static method, calculate.

public static int calculate(int x)
{
x = x + x;
x = x + x;
x = x + x;

return x;
}
Which of the following can be used to replace the body of calculate so that the modified version of calculate will return the same result as the original version for all values of x?

return 8 * x;
return 3 + x;
return 3 * x;
return 6 * x;
return 4 * x;

Answers

Answer:

return 8 * x;

Explanation:

Required

What can replace the three lines of x = x + x

We have, on the first line:

[tex]x=>x +x[/tex]

[tex]x=>2x[/tex]

On the second line:

[tex]x=>x +x[/tex]

[tex]x=>2x[/tex]

Recall that, the result of line 1 is: [tex]x=>2x[/tex]

So, we have:

[tex]x=>2 * 2x[/tex]

[tex]x=>4x[/tex] --- at the end of [tex]line\ 2[/tex]

On the third line:

[tex]x=>x +x[/tex]

[tex]x=>2x[/tex]

Recall that, the result of line 2 is: [tex]x=>4x[/tex]

So, we have:

[tex]x = 2 * 4x[/tex]

[tex]x => 8x[/tex]

So: 8 * x can be used

. Suppose an instruction takes 1/2 microsecond to execute (on the average), and a page fault takes 250 microseconds of processor time to handle plus 10 milliseconds of disk time to read in the page. (a) How many pages a second can the disk transfer? (b) Suppose that 1/3 of the pages are dirty. It takes two page transfers to replace a dirty page. Compute the average number of instructions between page fault that would cause the system to saturate the disk with page traffic, that is, for the disk to be busy all the time doing page transfers.

Answers

Answer:

a. 100.

b. 31500.

Explanation:

So, we are given the following data which is going to help in solving this particular question.

The time required to execute (on the average) = 1/2 microsecond , a page fault takes of processor time to handle = 250 microseconds and the disk time to read in the page = 10 milliseconds.

Thus, the time taken by the processor to handle the page fault = 250 microseconds / 1000 = 0.25 milliseconds.

The execution time = [ 1/2 microseconds ]/ 1000 = 0.0005 milliseconds.

The number of Pages sent in a second by the disc = 1000/10 milliseconds = 100.

Assuming U = 1.

Hence, the disc transfer time = [2/3 × 1 } + [ 1/3 × 0.25 milliseconds + 15 ] × 2.

=0.667 + 15.083.

= 15.75 millisecond.

Average number of instruction = 15.75/0.0005 = 31500.

It should be noted that the number of pages in a second will be 100 pages.

From the information given, it was stated that the instruction takes 1/2 microsecond to execute and a page fault takes 250 microseconds of processor time to handle plus 10 milliseconds of disk time to read the page.

Therefore, the execution time will be:

= 0.5/1000

= 0.0005

Therefore, the number of pages will be:

= 1000/10

= 100

Also, the disc transfer time will be;

= (2/3 × 1) + (1/3 × 0.25 + 15) × 2

= 0.667 + 15.083

= 15.75

Therefore, the average number of instructions will be:

= 15.75/0.0005

= 31500

Learn more about time taken on:

https://brainly.com/question/4931057

Research: Using the Internet or a library, gather information about the Columbian Exchange. Takes notes about the specific goods and diseases that traveled back and forth across the Atlantic, as well the cultural and political changes that resulted. Pay special attention to the indigenous perspective, which will most likely be underrepresented in your research.

Answers

Answer:

Small pox, cacao, tobacco, tomatoes, potatoes, corn, peanuts, and pumpkins.

Explanation:

In the Columbian Exchange, transportation of plants, animals, diseases, technologies, and people from one continent to another held. Crops like cacao, tobacco, tomatoes, potatoes, corn, peanuts, and pumpkins were transported from the Americas to rest of the world. Due to this exchange, Native Americans were also infected with smallpox disease that killed about 90% of Native Americans because this is a new disease for them and they have no immunity against this disease. Due to this disease, the population of native Americans decreases and the population of English people increases due to more settlement.

Which cable standard is a standard for newer digital cable, satellite, and cable modem connections?

Answers

Answer:

Coaxial cable

Explanation:

Create a Department object which contains a name (String), budget (double), and an ArrayList of Employee objects. Each Employee object contains a FirstName (String). LastName(String), and an Address object. Each Address object contains a Street (String), Apartment (int), City (String), and State as a char array of length 2. The Apartment parameter is optional but the other three are mandatory! Ensure no Address object can be created that does not have them. Finally, create a test program that allows users to Add, Delete, Print, and Search the Employees of a Department.

Answers

Answer:

Explanation:

The following code is very long and is split into the 4 classes that were requested/mentioned in the question: Department, Employee, Address, and Test. Each one is its own object with its own constructor. Getters and Setters were not created since they were not requested and the constructor handles all of the variable creation. Address makes apartment variable optional by overloading the constructor with a new one if no argument is passed upon creation.

package sample;

import sample.Employee;

import java.util.ArrayList;

class Department {

   String name = "";

   double budget = 0;

   ArrayList<Employee> employees = new ArrayList<>();

   void Department(String name, double budget, ArrayList<Employee> employees) {

       this.name = name;

       this.budget = budget;

       this.employees = employees;

   }

}

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

package sample;

public class Employee {

   String FirstName, LastName;

   Address address = new Address();

   public void Employee(String FirstName, String LastName, Address address) {

       this.FirstName = FirstName;

       this.LastName = LastName;

       this.address = address;

   }

}

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

package sample;

class Address {

   String Street, City;

   int apartment;

   char[] state;

   public void Address(String street, String city, char[] state, int apartment) {

       this.Street = street;

       this.City = city;

       this.state = state;

       this.apartment = apartment;

   }

   public void Address(String street, String city, char[] state) {

       this.Street = street;

       this.City = city;

       this.state = state;

       this.apartment = 0;

   }

}

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

package sample;

public class Test extends Department {

   public void add(Department department, Employee employee) {

       department.employees.add(employee);

   }

   public void delete(Department department, Employee employee) {

       for (int x = 0; x < department.employees.size(); x++) {

           if (department.employees.get(x) == employee) {

               department.employees.remove(x);

           }

       }

   }

   public void Print(Department department, Employee employee) {

       for (int x = 0; x < department.employees.size(); x++) {

           if (department.employees.get(x) == employee) {

               System.out.println(employee);

           }

       }

   }

   public void Search (Department department, Employee employee) {

       for (int x = 0; x < department.employees.size(); x++) {

           if (department.employees.get(x) == employee) {

               System.out.println("Employee is located in index: " + x);

           }

       }

   }

}

PLEASE SOMEONE ANSWER THIS

If the old code to a passcode was 1147, and someone changed it, what would the new code be?


(It’s no version of 1147, I already tried that. There are numbers at the bottom of the pictur, it just wouldn’t show.)




[I forgot my screen time passcode please someone help I literally can’t do anything on my phone.]

Answers

Answer:

There's no way for anyone but you to know the password. Consider this a lesson to be learned - keep track of your passwords (and do it securely). If you can't remember your password for this, the only alternative is to factory reset your device.

I don't know exactly if this passcode instance is tied to your Icloud account.. if it is, factory resetting will have been a waste of time if you sign back into your Icloud account. In this case, you would need to make a new Icloud account to use.

Suppose that a computer has three types of floating point operations: add, multiply, and divide. By performing optimizations to the design, we can improve the floating point multiply performance by a factor of 10 (i.e., floating point multiply runs 10 times faster on this new machine). Similarly, we can improve the performance of floating point divide by a factor of 15 (i.e., floating point divide runs 15 times faster on this new machine). If an application consists of 50% floating point add instructions, 30% floating point multiply instructions, and 20% floating point divide instructions, what is the speedup achieved by the new machine for this application compared to the old machine

Answers

Answer:

1.84

Explanation:

Operation on old system

Add operation = 50% = 0.5

Multiply = 30% = 0.3

Divide = 20% = 0.2

T = total execution time

For add = 0.5T

For multiplication = 0.3T

For division = 0.2T

0.5T + 0.3T + 0.2T = T

For new computer

Add operation is unchanged = 0.5T

Multiply is 10 times faster = 0.3T/10 = 0.03T

Divide is 15 times faster = 0.2T/15= 0.0133T

Total time = 0.5T + 0.03T + 0.0133T

= 0.54333T

Speed up = Old time/ new time

= T/0.54333T

= 1/0.54333

= 1.84

What values are stored in nums after the following code segment has been executed?

int[] nums = {50, 100, 150, 200, 250};
for (int n : nums)
{
n = n / nums[0];
}
[1, 2, 3, 4, 5]
[1, 1, 1, 1, 1]
[1, 100, 150, 200, 250]
[50, 100, 150, 200, 250]
An ArithmeticException is thrown.

Answers

Answer:

D.[50, 100, 150, 200, 250]

Explanation:

This is a trick question because the integer n is only a counter and does not affect the array nums. To change the actual array it would have to say...nums[n] = n/nums[0];

if a mosquito on the right is moving 10m/s and has kinectic enegry 0.25 j what is the mass​

Answers

Answer:

Mass = 0.005 kg

Explanation:

Given:

Velocity V = 10 m/s

kinetic energy 0.25 j

Find:

Mass of mosquito

Computation:

K.E = 1/2(m)(v²)

0.25 = 1/2(m)(10²)

0.5 = m x 100

Mass = 0.005 kg

1. P=O START: PRINT PP = P + 5 IFP
<=20 THEN GOTO START: * what is output​

Answers

Answer:

0

5

10

15

20

Explanation:

P=O should be P=0, but even with this error this is the output.

When P reaches 20 it will execute the loop once more, so 20 gets printed, before getting increased to 25, which will not be printed because then the loop ends.

Define a function below, filter_out_strs, which takes a single argument of type list. Complete the function so that it returns a list that contains only the non-strings from the original list. It is acceptable to return an empty list if there are only strings in the original list. This question uses the filter pattern discussed in lecture.

Answers

Answer:

Explanation:

The following code is written in Python and is a simple function that removes all of the type String elements within the list that has been passed as an argument. Then finally, prints out the list and returns it to the user.

def filter_out_str(list):

   for x in list:

       if type(x) == type(" "):

           list.remove(x)

   print(list)

   return list

Following are the python code to hold only string value into another list by using the given method:

Python code:

def filter_only_strs(l):#defining the method filter_only_strs that takes list type variable l in parameter

   r = []#defining an empty list r

   for x in l:#defining a loop that counts value of list

       if isinstance(x, str):#using if block that check list value is in string

           r.append(x)#using an empty list that holds string value

   return r#return list value

l=['d',12,33,"data"]#defining a list l

print(filter_only_strs(l))#calling the method filter_only_strs

Output:

Please find the attached file.

Program Explanation:

Defining the method "filter_out_strs", which takes one argument of list type that is "l".Inside the method, an empty list "r" is defined, and in the next line, a for loop is declared.Inside the for loop list "l" is used with a conditional statement that uses the "isinstance" method that checks string value in the list and adds its value in "r", and returns its value.

Find out more about the list in python here:

brainly.com/question/24941798

Write as many accurate and relevant statements about the following prompt as you can think of. You are free to use any of the resources provided to you. Drawings with descriptions of their meanings can be considered a response. A total of 5 correct responses will provide full credit for the assignment and incorrect responses will not effect the number of points received on the exercise.

Answers

Answer:

1. The structure is prone to hydrophobic interaction due to the presence of a hydrophobic side chain.

2. The amino acid side chain can form hydrogen bonds due to the presence of hydrogen and nitrogen.

3. It is the primary structure of proteins (polypeptides)

4. With the presence of sulfur in the amino acid, disulfide linkage can be formed.

5.  Both structures are Cysteine and histidine side chains of amino acids.

Explanation:

Proteins are organic materials. The two structures are the primary structures of the primary protein molecule which is the amino acid. They can be found in both plants and animals as it promotes cellular regeneration of damaged tissues and cell and the development of organs in living things. It is also found naturally in other materials in our enviroment.

what is computer? different between RAM and ROM?​

Answers

Answer:

RAM, which stand for RANDOM ACESS MEMORY and ROM whitch stand for READ ONLY MEMORY, are both present in your computer. RAM volatile memory that temporary store the file you are working on. ROM is a non volatile memory that permanently stores instruction for your COMPUTER.

Suppose Alice and Bob have RSA public keys in a file on a server. They communicate regularly using authenticated, confidential messages. Eve wants to read the messages but is unable to crack the RSA private keys of Alice and Bob. However, she is able to break into the server and alter the file containing Alice's and Bob's public keys. a. How should Eve alter that file so that she can read confidential messages sent between Alice and Bob, and forge messages from either

Answers

Answer:

On the server, Eve could create and register her own version of Bob's and Alice's pairs of keys, then she can intercept the communication between Bob and Alice, decrypt the message and recalculate the hash, and also re-encrypting it all with her own version of Bob's and Alice's private and public keys.

Explanation:

Cryptography is the study of various methods to secure communication between two parties in the presence of a third known as adversaries.

Messages sent through communication mediums are encrypted to protect the confidentiality and integrity of their content. Using secure pins known as keys are used in some type of cryptography to encrypt and decrypt messages.

These keys are protected from adversaries and should be secured in servers.

In cell F5, enter a formula using the PMT function. Insert a negative sign (-) after the equal sign in the formula to display the result as a positive amount. Use defined names for the rate, nper, and pv arguments as follows:
· rate argument: Divide the Rate by 12 to use the monthly interest rate.
· nper argument: Multiply the Term by 12 to specify the number of months as the periods.
· pv argument: Use the Loan_Amount as the present value of the loan.
2.In cell F6, enter a formula without using a function that multiplies 12 by the Term and the Monthly_Payment, and then subtracts the Loan_Amount to determine the total interest
3. in cell J5, enter another formula using the PV function. Use defined cell names for the rate, nper, and pmt arguments as follows:
· rate argument: Divide the Rate by 12 to use the monthly interest rate.
· nper argument: Subtract the year value in cell H5 from the Term, and then multiply the result by 12 to specify the number of months remaining to pay off the loan.
· pmt argument: Use the Monthly_Payment as a negative value to specify the payment amount per period.

Answers

Answer:

Open MS-Office Excel (a.) Define name for rate, nper and pv cells as Rate, Term and Loan_Payment. Select the cell then Menu > Formulas

what is difference between computer and smartphone

Answers

Answer: One is smaller than the other.

Pennies for Pay Design and write a python program to pass Lab 4-7 with the following modifications: 1.use an outer loop to keep the program running until zero (0) day for the payroll calculation be entered 2.use an inner loop to calculate and print the daily and total payroll

Answers

Answer:

Here you go, change it however you'd like :)

Explanation:

(A nested loop was not needed to fulfill this task)

usr = int(input("How many days would you like to calculate: "))

pen = 0.01

for n in range(1, usr + 1):

   print(f"Day: {n} | Amount: ${pen}")

   pen += pen

which of the following is not an aspect of form
A Emotion.
B Color.
C Shape.
D Rhythm

Answers

answer is A. Emotion

(08.02 LC)
It is appropriate to leave sections of an application blank.
O True
O False

Answers

Explanation:

it is false because it is not appropriate

I think it is false to

Suppose you decide to use the number of times you see any of the area codes of the places Yanay has been to in 50 spam calls as your test statistic. Question 7. Write a function called simulate_visited_area_codes that generates exactly one simulated value of your test statistic under the null hypothesis. It should take no arguments and simulate 50 area codes under the assumption that the result of each area is sampled from the range 200-999 inclusive with equal probability. Your function should return the number of times you saw any of the area codes of the places Yanay has been to in those 50 spam calls. Hint: You may find the textbook section on the sample_proportions function to be useful. For model_proportions, under the null hypothesis, what's the chance of drawing one of the area codes Yanay has recently been to

Answers

Answer:

In Python:

import random

def simulate_visited_area_codes():

   area_codes = []

   for i in range(51):

       num = random.randint(200,1000)

       area_codes.append(num)

   visited_codes = [289, 657, 786, 540]

   count = 0

   for i in range(51):

       for j in range(len(visited_codes)):

           if area_codes[i] == visited_codes[j]:

               count+=1

   return count

print("Visited Areas: "+str(simulate_visited_area_codes()))

Explanation:

So many incomplete details in your question, so I will fill in the gap (i.e. make assumptions)

The assumptions are:

The 50 area codes is stored in area_codes list; the codes are randomly generatedThe visited area codes is stored in visited_codes list, the list is initializes with [289, 657, 786, 540]

The program and explanation is as follows: (comments are written in bold)

#This imports the random module

import random

#This defines the function

def simulate_visited_area_codes():

#Thie initializes area_codes to an empty list

   area_codes = []

#This iterates from 1 to 50 and generate 50 random numbers to the area_codes list

   for i in range(51):

       num = random.randint(200,1000)

       area_codes.append(num)

#This initializes the visited_code

   visited_codes = [289, 657, 786, 540]

#This initializes count variable to 0

   count = 0

#This iterates through the list and looks for matching code between the area_code and the visited_code lists

   for i in range(51):

       for j in range(len(visited_codes)):

           if area_codes[i] == visited_codes[j]:

#The count variable is incremented by 1 for matching codes

               count+=1

#This returns the count

   return count

#The main begins here and prints the number of area code visited

print("Visited Areas: "+str(simulate_visited_area_codes()))

Simulate Function:

Simulate one or more responses from the distribution corresponding to a fitted model object.

The code is shown below:-

visited_test_statistics_under_null = make_array()

repetitions = 20000

for i in np.arange(repetitions):

  new_sum_of_correct_area_code = simulate_visited_area_codes()

  visited_test_statistics_under_null = np.append(visited_test_statistics_under_null, new_sum_of_correct_area_code)

visited_test_statistics_under_null( )

Learn more about the topic Simulate Function:

https://brainly.com/question/14492046

At a coffee shop, a coffee costs $1. Each coffee you purchase, earns one star. Seven stars earns a free coffee. In turn, that free coffee earns another star. Ask the user how many dollars they will spend, then output the number of coffees that will be given and output the number of stars remaining. Hint: Use a loop

Answers

Answer:

Explanation:

The following is written in Python, no loop was needed and using native python code the function is simpler and more readable.

import math

 

def coffee():

   dollar_amount = int(input("How much money will you be using for your purchase?: "))

   free_coffees = math.floor(dollar_amount / 7)

   remaining_stars = dollar_amount % 7

   print("Dollar Amount: " + str(dollar_amount))

   print("Number of Coffees: " + str(dollar_amount + free_coffees))

   print("Remaining Stars: " + str(remaining_stars))

Other Questions
Find the distance between (5, 9) & (-7, -7). Round to the nearest tenth. What's the mass in grams of 0.334 moles of sucrose (C12H22O11)? In each of the following sets of elements, which element would be expected to have the smallest atomic size?a) Na, K, Rbb) Mg, P, Sc) N, P, Sbd) C, O, F I did not get the right answer, please help. Find the measure of 49Xadegreesplease help Do you think that federal spending specifically to create jobs for Depression victims was a good idea, or would it have been better to ask the states and private charities to take a larger role in the relief efforts? Why? ahshepfnshaudjfornds(word count lol) is amazon a e-commerce website o true o false what are *4* positive and *4* negative impacts of the Columbian Exchange? also, please explain each of the impacts. *PLEASE* Solve for X round to 2 decimal place Why are fossils not found in igneous or metamorphic rocks? Nosotros ____ en la playa hoy.A. comeremosB. estamos comiendoC. comamosD. comeramos Under the transactional model, communication is like playing a game of toss with: *?A.BalloonB.BaseballC.Ball of clayD.Hot potato (Python): I wanted to end my code with main() and that was a bad statement for some reason, help! Come up with a real-life situation that couldbe represented by 10^5 Constitutional rights which is the _________________ right to choose whether to enforce a law. Please help!!! We just saw an example of "Survival of the fittest" with the rabbits that survived. We often use this as an expression to describe natural selection. Use another example (any example you can think of and IN YOUR OWN WORDS) to explain how survival of the fittest (aka natural selection) leads to evolution. If total expenditure of firm is Rs. 1000 i). Price of labour (PL)is Rs 200. ii). |Price of capital (PK) is Rs. 100, then determine the budget line for the firm? ( Nick manages a grocery store in a country experiencing a high rate of inflation. He is paid in cash twice per month. On payday, he immediately goes out and buys all the goods he will need over the next two weeks in order to prevent the money in his wallet from losing value. What he can't spend, he converts into a more stable foreign currency for a steep fee. This is an example of the of _________inflation.a. menu costsb. shoe-leather costsc. unit-of-account costs