1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
NemiM [27]
3 years ago
6

Define an array to be a Mercurial array if a 3 does not occur between any two 1s. Write a function named isMercurial that return

s 1 if its array argument is a Mercurial array, otherwise it returns 0
Computers and Technology
1 answer:
otez555 [7]3 years ago
7 0

The Mercurial array program is an illustration of arrays, loops and conditional statements

<h3>How to write the program?</h3>

The program written in Python, where comments are used to explain each action is as follows:

#This defines the function

def checkMercurialarray(myarr):

   #This checks if the array contains 3

   if myarr.count(3) > 0:

       #If yes, this checks if the elements before and after 3 is 1

       if myarr[myarr.index(3)- 1] == 1 and myarr[myarr.index(3)+ 1] == 1:

           #This returns 1 if true

           return "1"

   #This returns 0

   return "0"

Read more about Python programs at:

brainly.com/question/26497128

#SPJ1

You might be interested in
To deny a host from sending HTTP traffic destined to a specific server you will need to apply a __________ Access Control List.
DedPeter [7]

I would a Standard Access control List

There are two common access lists: The standard and extended access list.  With the standard access list, it creates filters only on source addresses and is commonly used for server-based filtering. They are not as powerful as extended access lists. Standard Access lists are typically used for restricting access to a router through HTTP and HTTPS.  


6 0
3 years ago
Read 2 more answers
What is ambient sound, and what is its purpose in film? When can it be a drawback ?
Helen [10]

Answer:

Ambient sound is an environmental sound or surrounding sounds. They use this kind of sound to give a film's scene credence(belief in or acceptance of something as true). When the sound starts to become distracting to the audience the drawback is used.

Explanation:

6 0
3 years ago
You may declare an unlimited number of variables in a statement as long as the variables are ____.
k0ka [10]

Answer:

b. the same data type

Explanation:

Any number of variables can be declared in a statement as long as the variables have the same data type. For example:

1) int a,b,c,d,e;

Here each of the declared variables a,b,c,d,e have the type int.

2) char p,q,r,s,t,u,v,w;

In this case variables p to w all have the type char.

3) float x,y,z;

x,y and z are all of type float.

6 0
4 years ago
Why is it essential to know what information will be needed from the database from the outset of development?
KIM [24]

Answer:

all of the answers

Explanation:

According to my research on information technology, I can say that based on the information provided within the question all of the answers provided would be important pieces of information to know. This is because each provides information on another and all information possible is helpful in a development process.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

7 0
4 years ago
The specific gravity of gold is 19.3. Write a MATLAB program that will ask the user to input the mass of a cube of solid gold in
s344n2d4d5 [400]

Answer:

Check the explanation

Explanation:

<em>Cube.m:</em>

mass = input("Enter the mass of cube [kilograms]: ");

if(mass<=0)

disp("Error: Mass must be greater than zero grams")

else

fprintf("The length of one side of cube is %.2f inches",2.7*mass);

end

<em>Output1</em>

octave:2> source ( Cube.m Enter the mass of cube [kilograms]: octave:2>-3 Error: Mass must be greater than zero grams

<em />

7 0
4 years ago
Other questions:
  • Rearrange the statements in the following order so that the program prompts the user to input: a. The height of the base of a cy
    12·1 answer
  • PLEASE HELP TAKING A TEST!!!
    10·2 answers
  • Which of the following is an example of indirect perception checking?
    7·2 answers
  • What third-party application serves as an alternative to OneNote?
    10·2 answers
  • (asking again because point-hogs exist)
    11·1 answer
  • What does a motherboard legacy BIOS do?
    11·1 answer
  • Suppose the CashRegister needs to support a method void undo() that undoes the addition of the preceding item. This enables a ca
    6·1 answer
  • What is computer hacking?
    14·1 answer
  • Any idea how to make my simple python projects such as guess the number, mad libs, etc. even better?
    15·2 answers
  • Write and test a program that computes the area of a circle. This program should request a number representing a radius as input
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!