What is the value of mystery(5)? int mystery(int n) { if (n > 0) return 3 - n % 2 + mystery(n-1); return 0; } Group of answer choices

Answers

Answer 1

Answer:

The function returns the largest of n number of elements in the array.

It takes an int array parameter int[] a, and an integer parameter n. It then assigns the first element of the array to an integer variable X.

The for loop begins at the second element of the array and loops less than n number of times. In each iteration, it checks if the element is greater than X and swaps it with X.

The function finally returns X.

Explanation:

hope this helped :)


Related Questions

What keyword do we use to tell Java to set aside memory to create an object?

Answers

Answer: You reserve memory locations for an array when you _____.

use the keyword new

In java, keywords are special words, that have reserved meaning; and they cannot be used for any other purpose apart from their predefined functions.

The keyword to set aside memory for objects is the new keyword.

The following syntax is used to create an object in java;

Object object_name = new Object();

Take for instance, you want to create a Scanner object.

We use the following:

Scanner scnr = new Scanner(System.in);

The new keyword will always be present when creating objects, in other to create the instance of the object, and allocate memory for the object that is being created.

Read more about java keywords at:

https://brainly.com/question/22082613

HELP PLEASE

Which of these criteria would be important to consider when choosing a
programming language?
1.The gameplay of the game.
2.The color scheme of the game.
3.Whether the game is aimed at the
mobile or web market.
4.Whether the game is played on WiFi
or cellular data.

Answers

Answer:

Most likely number 3 because when coding a game, not all languages are meant to be put on all devices--mobile, console, PC--so you have to consider where the game is meant to be played on and how you plan to port that game over.

Explanation:

The programming language a set of formal languages that consists of various types of machine code outputs. This type of language is used for programming algorithms.  

Most of the programming languages consist of instructions for a computer. One may consider the programming language that can be developed and then executed rapidly. The programmers need to keep in mind the various considerations for making the language. Such as the audience and market.

Hence the option 3 is correct.

Learn more about the criteria would be important to consider when choosing a  programming language.

brainly.com/question/21859910.

Which Call of Duty game is the best?
A. Black Ops 1-4
B. Modern Warfare 1-4
C. Infinite Warfare
D. Advanced Warfare
E. Ghosts
F. WWII

Answers

Answer:

i like ghost and modern 3

Explanation:

Select the correct answer.
If you want a bachelor’s degree, you should go to:

A. A four-year college or university
B. A vocational or technical school
C. An apprenticeship
D. A community college Reset Next

Answers

A. A four year college or university

Answer:

A. A four-year college or university.

Explanation:

A bachelor's degree requires four years of education to be awarded.

True or False?If you live in a country that uses censorship,you may not be able to access certain websites.ONLY ANSWER IF UR 100% SURE​

Answers

Answer:

true

Explanation:

censorship is when you don't let people see something,if a country uses censorship they may stop you from seeing certain websites.

what does abraham Lincoln whish for his son's teacher​

Answers

Answer:

To teach him his talents and brains

basically to teach them what the teacher knew

To live this life will require faith, love and courage. So dear Teacher, will you please take him by his hand and teach him things he will have to know, teaching him – but gently, if you can. Teach him that for every enemy, there is a friend. He will have to know that all men are not just, that all men are not true.

A credit card company receives numerous phone calls throughout the day from customers reporting fraud and billing disputes. Most of these callers are put "on hold" until a company operator is free to help them. The company has determined that the length of time a caller is on hold is normally distributed with a mean of 2.5 minutes and a standard deviation 0.5 minutes. If 1.5% of the callers are put on hold for longer than x minutes, what is the value of x? Use Excel, and round your answer to two decimal places.

Answers

Answer:

3.59 minutes

Explanation:

We solve this question using z score formula

Using Excel

Z-SCORE= (DataPoint-AVERAGE(DataSet))/STDEV(DataSet)

IN EXCEL,

AVERAGE, an excel function that calculates the Average of data set

STDEV.S: calculates the standard deviation while treating the data as a ‘sample’ of a population.

STDEV.P: This function calculates the standard deviation while treating the data as the entire population.

Z score formula = x - μ/σ

x = ?? μ = 2.5 minutes σ = 0.5 minutes

We are asked : If 1.5% of the callers are put on hold for longer than x minutes, what is the value of x?

Hence, Longer than = Greater than =

100 - 1.5%

= 100 - 0.015

= 0.985 ( 98.5%)

Using Excel we calculate = z score for 98.5 percentile

= 2.1701

Z score = x - μ/σ

2.1701 = x - 2.5/0.5

2.1701 × 0.5 = x - 2.5

1.08505 = x - 2.5

x = 1.08505 + 2.5

x = 3.58505

Approximately to 2 decimal places = 3.59 minutes

Therefore, 1.5% of the callers are put on hold for longer than 3.59 minutes.

1.6 code practice: question 1 edhesive

Answers

Answer: g = input("Enter a word: ")

m= input("Enter a word: ")

print(g +" " +m)

Explanation:

Does anyone know how to ask the user to input their name and then print the name 10 times using a while loop and have the 10 names on different lines?

Answers

In python:

name = input("What's your name? ")

i = 0

while i <= 10:

   print (name)

   i += 1

I hope this helps!

someone uses instant messaging on a social media website to talk to her friends.give two advantages of using social media​

Answers

Answer:

Social media can be used to gain informationTo communicate with people far awaySocial media can help in broadcasting a bussiness .

What is the drawback of the linear model?
A.
communication is only in one direction
B.
too much noise is created
C.
no feedback is sent on receiving the message
D.
long travel between the sender and the receiver

Answers

Answer:

long travel between the sender and the receiver

Explanation:

The drawback of linear model is long travel between the sender and the receiver. The correct option is D.

What is linear model?

Depending on the context, the phrase "linear model" is used differently in statistics.

The word is frequently used interchangeably with a linear regression model since it occurs most frequently in relation to regression models.

The phrase has a different connotation when employed in time series analysis, though.

Something that is linear is related to a line. A line is built using all of the linear equations. A non-linear equation is one that cannot be represented by a straight line. It has a variable slope value and resembles a graphed curve.

The linear model's disadvantage is the distance between the transmitter and the receiver.

Thus, the correct option is D.

For more details regarding linear model, visit:

https://brainly.com/question/29757372

#SPJ2

what is information that can be proven with evidence A opinion B copy C fact D paste

Answers

Answer:

C

Explanation:

A fact is a true statement with evidence

Answer: C. Fact

Explanation: if it was already proven with evidence then we can confirm it was a fact

Determine if the given software is system software or application software.

Answers

Answer:

system software: system software maintain the system resource and give the path for application software to run

application software: application software is built for specific task

Explanation:

if you think the answer in your opinion correct then mark me as brain list

Answer:

I believe this to be the answer to the question you refer.

Explanation:

System software:

-data recovery

-macOS

Application software:

-presentation

-spreadsheet

Answers are cut short for convenience so do not worry if they are not the exact same answers from your question.

Also, if these answers do not even apply to your question then you have a different question. Good luck.

PRACTICE
.
3. Write a program asks the user to enter their first name and their last name, separated by a space.
Break the input string up into two strings, one containing the first name and one containing the last
name. You can do that by using the indexOf() subroutine to find the position of the space, and then
using substring0 to extract each of the two names. (should save each into its own variable)
• A sample run of the program should look something like this:
Please enter your first name and last name, separated by a space. ?
Mary Smith
Your first name is Mary.
Your last name is Smith.

(I am using Notepad)​

Answers

class Name

{

public static void main(String args[])

{

String name, firstName,lastName;

int blankIndex,fchar,lchar;

System.out.println("Enter your name having space between first name and last name");

Scanner in = new Scanner(System.in);

name= in.nextLine();

blankIndex = name.indexOf(' ');

firstName = name.substring(0,blankIndex-1);

lastName = name.substring(blankIndex+1, name.length()-1);

fchar = firstName.length();

lchar = lastName.lenght();

System.out.println("You entered the name"+name); Â Â

System.out.println("Your firstname is"+firstName+"has"+fchar+"characters" );

System.out.println("Your lastname is"+lastName+"has"+lchar+"characters" );

}

}

13. Microsoft PowerPoint is the best example of Multimedia Presentation
Software.
OFalse
True​

Answers

Answer:

Uhhh...ooop.........

I’m pretty sure it is either falsely true or truly false

Why Salt become such a valuable item a long time ago because? esay

Answers

Answer:

Explanation:If you could choose between a pile of salt and a pile of gold, you would probably choose the gold. After all, you know that you can always buy a container of salt for about forty-five cents at the local supermarket. But what if you could not easily get salt, and without it you could not survive? In fact, throughout history salt has been very difficult to obtain in many parts of the world, and people feared a lack of salt the way we in the industrialized world fear a shortage of fuel oil.

Once cultures began relying on grain, vegetable, or boiled meat diets instead of mainly hunting and eating roasted meat, adding salt to food became an absolute necessity for maintaining life. Because the Akan lived in the forests of West Africa, they had few natural resources for salt and always needed to trade for it. Gold, however, was much easier to come by. Every Akan knew how to find tiny grains of gold sparkling in the river beds after a rainfall. The people who lived in the desert of North Africa could easily mine salt, but not gold. They craved the precious metal that would add so much to their personal splendor and prestige. These mutual needs led to the establishment of long-distance trade routes that connected very different cultures.

Camel caravans from North Africa carried bars of salt as well as cloth, tobacco, and metal tools across the Sahara to trading centers like Djenne and Timbuktu on the Niger River. Some items for which the salt was traded include gold, ivory, slaves, skins, kola nuts, pepper, and sugar.

all of the following are examples of service learning opportunities exept

Answers

Answer:

give following examples please

A company creates an identity for a product through its logo,
packaging and promotions. Customers like the product and
remember their good feelings every time they see something
about the product. They continue to buy the product and also tell
their friends about it, which increases sales. What is this an
example of?
O Product Life Cycle
O Product Classification
O Product Mix
O Branding

Answers

Answer:

branding

Explanation:

Which e-mail netiquette rules did the student break? Check all that apply.

Answers

Answer: B, D, and E in other words 2, 4, and 5

Answer:a b e

Explanation:

the other person is wrong

You are planning a program to find the maximum heart rate recommended for patrons of a gym where you have a part-time job. One formula for calculating
the maximum heart rate is the difference between 220 and the patron's age.
You are testing for accuracy.
If a patron is 15 years old, what is the maximum heart rate?

Answers

The program would look like:

age = int(input("What's your age? "))

print(f"Your maximum heart rate is {220 - age}.")

If we input 15 as the age, the maximum heart rate is 220 - 15, which equals 205

The maximal heart rate is 220 minus 15, which is 205 if we enter 15 as the age.

What is meant by patrons?

A patron is a special guardian, protector, or supporter of the arts as defined in definition. A wealthy or influential ally of an artist.

A patron is someone who frequently uses a business's services or makes financial contributions to another person or cause, such as an arts patron. A customer is someone who goes to the same restaurant every week, for instance.

Formal someone who often visits a particular restaurant, hotel, or other business. This parking lot is for customers only. synonyms and comparable words. a stay in a hotel or guesthouse. Bookable.

The word patron comes from the Latin pater or patr- meaning "father." Think of how a father is supposed to financially support his kids. A patron of the arts is someone who shows his appreciation or support for the arts by donating money to arts organizations.

Thus, The maximal heart rate is 220 minus 15,

For more details about patrons, click here:

https://brainly.com/question/16783674

#SPJ5

find 5 rational numbers between -1 and 1​

Answers

1. = 0
2. =-0.5
3.=-0.75
4.=-0.875
5.=-0.9375

1. Your older brother Max tells you about his secret plan to hack into his college's computer network
and change all of his grades. What should you say to Max to convince him that his plan is both
illegal and unethical? Be sure to discuss possible consequences of his actions.

Answers

Answer: You could get in troulble for it and also they could see when its changed and change it back.

Explanation:

If a brother, Max tells that he is trying to hack the computer network to increase his grade. It is important to tell him that it is unethical and illegal, as he can get jailed for it and restricted from the college.

What is hacking?

A hacker is an information technology expert who employs non-standard methods to attain a goal or overcome an impediment within a computerized system.

The act of detecting and then exploiting holes in a computer system or network, usually to obtain unauthorized access to personal or organizational data, is known as hacking.

Therefore, Max informs his brother that he is attempting to hack the computer network in order to improve his grade. It is critical to inform him that it is immoral and unlawful, as he may face jail time and expulsion from the college as a result.

To learn more about hacking, refer to the link:

https://brainly.com/question/14835601

#SPJ5

para saan po yung points dito?

Answers

Answer:

Hindi kudin Alam eh hahahha

Answer:

Hey, there this is the answer

Users need to use points to post a question. The more points they use, the more quickly their question will be answered. Users gain a basic number of points each time they log into the platform.

________, also known as mini notebooks, are lighter and thinner with longer battery life than most laptops.

Answers

Netbooks or Ultrabook  also known as mini notebooks, are lighter and thinner with longer battery life than most laptops.

What is mini notebook computer?

This is a term that is also called Netbooks.  They are regarded as  “small form” computers.

Ultrabook is known to be a small and very portable laptop that is known to be very light and thin and also has a longer battery life than other kinds of laptops.

Learn more about books from

https://brainly.com/question/17506968

Gabriel wants brain food for dinner the night before his final exam. What is best for him to eat? fried chicken and onion rings burgers and ice cream pizza and cookies grilled chicken and vegetables.

Answers

This is a good inquiry, especially applicable to the study of computers and technology.
It sounds like a prediction problem, in terms of measuring multiple variables calculating their betas and outputting the probability of choosing the following given we have a final the next day.

So let’s start by declaring variables for our model:

Calories: quantitative variable
Consumption time: time to eat the given food also quantitative
Cooking time: quantitative
Baking necessary: categorical 0 = no 1 = yes
Frying necessary: categorical 0 = no 1 = yes
Satisfaction brought: quantitative
Healthy: categorical 0 = no 1 = yes

Now create a data table for implementing our multinominal logistical regression function
I’ll be using 1 serving size for each measure
Fried chicken and onion rings
Cal: 320 (half chicken) + 240 (9 rings) = 560
Consumption time: 10 minutes (avg of sampling data with SD of 2.1 minutes)
Cooking time: 90 minutes + 20 minutes = 110 minutes (based on compiled recipes)
Baking: 0
Frying: 1
Satisfaction(max 10): 9 (-1 for oiliness)
Healthy: 0

Burgers and ice cream
Cal: 354 + 137(1/2 cup) = 491
Consumption time: 8 (mean with sd of 3.2)
Cooking time: 23 minutes (recipe) + 30 minutes (travel time to store and from) = 53 minutes
Baking: 0
Frying: 0
Satisfaction(max 10): 10
Healthy: 0

Pizza and cookies
Cal: 570 (2 slices) + 142 (1 cookie) = 712
Consumption time: 9 minutes (avg of sampling data with SD of 1.3 minutes)
Cooking time: 50 minutes + 72 minutes = 122 minutes (based on compiled recipes)
Baking: 1
Frying: 0
Satisfaction(max 10): 8 (not lactose intolerant friendly)
Healthy: 0

Grilled chicken and vegetables (roasted)
Cal: 162 (chicken breast) + 147 (1 cup) = 309
Consumption time: 9 minutes (avg of sampling data with SD of 1.46 minutes)
Cooking time: 30 minutes + 45 minutes = 75 minutes (based on compiled recipes)
Baking:1
Frying: 0
Satisfaction(max 10): 6 (cause chicken breast is dry and vegetables are nasty)
Healthy: 1

Now to develop our prediction model.
With training and validation data I was outputted the following beta coefficients.

X-int = 2.74
B1: -2.35 with p value of 0.002
B2: -0.72 with p value of 0.038
B3: -0.6 with p value of 0.047
B4: -1.2 with p value of 0.371
B5: -0.81 with p value of 0.016
B6: 2.91 with p value of 0.000
B7: 0.2 with p value of 0.007

Now building our prediction model we combine beta values with their coefficients then take e^x of each of the given options to find the probability of choosing each.

Answer:

Grilled Chicken and Vegetables

Explanation:

these are the two healthiest options for you body and mind

What are the programs required to work in computer

Answers

Answer:

Specific requirements vary by employer, but completing a degree program or a coding academy is generally necessary to begin a career as a computer programmer.

Explanation:

please mark me as brainliest

Henry wants to create a website for his projects. He needs it to have a lot of textual content, proper formatting, and animations. Which languages will he need for this?

Henry can us ____to create the web content. He can use ____ to style the content he has created and _____ to create animation

the blank choices can be filled with
1.CSS HTML XML
2.CSS XML DHTML
3. Javascript Shockwave ActionScript ​

Answers

Answer:

1. HTML

2. CSS

3. JavaScript

Explanation:

Shockwave and Actionscript are no longer used on the web.

The Answer Above is incorrect. This is the correct answer:

A word processing program would probably be used to

Answers

Answer:

Create a contract to hire someone

Explanation:

(APEX)

Answer:

the answer is Create a contract to hire someone

Explanation:

What is the output of this program? numA = 10 for count in range(5): numA = numA + 2 print (numA)​

Answers

Answer:

20

it runs the code 5 times, 10+2+2+2+2+2 basically. E.g 20

Answer: 20

Explanation: got  it right on edgen

Employment of web developers is projected to grow _________ From 2019 to 2029, much faster than the average for all occupations.
A)10%
B)5%
C)20%
D)8%
E)12%​

Answers

Answer:

E

Explanation:

The demand for web developers are projected to grow to such a size because of the worlds expected connection to the internet will need web developers to accomadate.

Other Questions
Wave interference occurs only when a wave is reflected.TRUE or false Which of the following is a compound?A. Na+B. NaClC. NaD. NaCl + Ag2O AgCl + Na2O why South Africa as a country has a shortage skilled workers There is a bag filled with 5 blue and 6 red marbles.A marble is taken at random from the bag, the colour is noted and then it is replaced.Another marble is taken at random.What is the probability of getting exactly 1 blue? The two cylinders in the picture above are similar. Find the radius of the smaller cylinder. A) 2.4 cm B) 6 cm C) 0.9 cm D) 0.6 cm SA = 2(lw + hw + hl), for wHELP PLEASE Help math math math Ivan rented a truck for the day. There is a base fee of $17.95, and there was an additional charge of 91 cents for each mile driven. Ivan had to pay $284.58 when he returned the truck. For how many miles did he drive the truck? Is the water cycle a scientific model. (I don't rember lol)(Yes) Or(No) WILL GIVE BRAINLYESTThere have been many con artists over the years all over the world. Sometimes, it seems amazing as to how they are able to get away with the things that they do. Think about the ideas in the two passages below, and then write an informative/explanatory essay explaining how these people successfully deceived others for many years. Be sure to use information from BOTH texts in your essay. ***Your response should be a minimum of 4-5 paragraphs in length. Here are the TWO things you'll need to complete your essay:1. Passage 1: Victor Lustig (Click HERE or view below)2. Passage 2: Albert Abrams (Click HERE or view below) which particle is gained and lost during a redox process? How did the experiences of the British and Continental armies in the winter of 1777-1778 differ? Daylight saving time, do you think we should have 1 hour ahead or behind? This rectangle represents the base of a rectangular prism. The height of the rectangular prism is 25 m.What is the volume of the rectangular prism? If my essay topic is on the production and sale of cigarettes needing to be illegal should my thesis be cigarettes should be made illegal due to numerous health issues? 8. Find GH,E3-4HY-H23x - 4GSIF9x - 59D If a person is prone to allergies, what treatment could redirect their immune response to help prevent future allergic reactions Economists study the way society uses its resources. One important resource studied is agriculture. The recent increase in demand for organic produce has created some interesting economic scenarios for both farmers and consumers. Click the article to learn key facts about the economics of organic produce and answer a few questions. Which is a reason that organic farming is more expensive than conventional farming? How many years must a farm be run organically before its produce can be labeled as "organic"? What is a benefit of crop rotation? lighting is to thunder as lunch where are the protons and neutrons located in an atom?