1. A certain game keeps track of the maximum and minimum scores obtained so far. If num represents the most recent score obtained, which of the following algorithms correctly updates the values of the maximum and the minimum?

A If num is greater than the minimum, set the minimum equal to num. Otherwise, if num is greater than the maximum, set the maximum equal to num.

B If num is less than the minimum, set the minimum equal to num. Otherwise, if num is greater than the maximum, set the maximum equal to num.

C If num is less than the minimum, set the minimum equal to num. Otherwise, if num is less than the maximum, set the maximum equal to num.

D If num is greater than the minimum, set the minimum equal to num. Otherwise, if num is less than the maximum, set the maximum equal to num.​

Answers

Answer 1

Answer:

The correct option is;

B. If num is less than the minimum, set the minimum equal to num. Otherwise, if num is greater than the maximum, set the maximum equal to num

Explanation:

The function of the score tracking application in the game = The sort and track the minimum and maximum

The variable, num, is used to indicate the value of the latest score obtained

The num variable is compared with the existing values stored in the minimum and maximum variables with an if condition

When the num satisfies te if condition, the value in the num variable replaces the value in the minimum or maximum variables respectively.

Answer 2

B. If num is less than the minimum, set the minimum equal to num. Otherwise, if num is greater than the maximum, set the maximum equal to num.

The game keeps track of of the maximum and minimum scores obtained. This means the game already have the maximum and minimum score in it memory.

Now , if a new score named num is obtained, for the game to update the minimum and maximum score it has to cross check the recent score , num with the minimum and maximum score. If the recent score, num is less than the minimum score, the minimum score is updated to the score, num.  

Also, If the recent score, num is greater than the maximum score, the maximum score is updated to the score, num.

Therefore, the answer :

B If num is less than the minimum, set the minimum equal to num. Otherwise, if num is greater than the maximum, set the maximum equal to num.

Read more here: https://brainly.com/question/20326478?referrer=searchResults


Related Questions

ASAP PLSS HELP ME

What is created when two plates pull apart (divergent plates). Give an example where this is occurring on
Earth

Answers

Answer:

When two continental plates diverge, a valleylike rift develops. This rift is a dropped zone where the plates are pulling apart. As the crust widens and thins, valleys form in and around the area, as do volcanoes, which may become increasingly active.

Hope this helps..

How would social learning theorists comment upon the portrayal of smoking in media?

Answers

They would have different thoughts and opinions on each

40 POINTS HELP!!
AP WORLD EDG 2020
In this assignment, you will continue to learn how to write a document-based question (DBQ) essay. If you have worked on part 1, you will add purpose to your graphic organizer by examining a set of six documents. Then, you will use historical context to revise your thesis, and add outside historical evidence to write an introductory paragraph.
If you did not work on part 1, you will deconstruct a prompt and complete a graphic organizer by examining a set of documents to determine their point of view, intended audience, historical context, and purpose. Then, you will use historical context to revise your thesis, and add outside historical evidence to write an introductory paragraph.

Answers

Answer:

The Mongols grew in power and influence from 1200 to 1350 CE. They used the silk road to grow and expand their territory. They also affected the Russian empire by incorporating Asian characteristics into their culture. They also developed places for education like universities and colleges. The men of Taurus attracted many merchants due to their incredible handiwork making the region flourish. As we continue throughout the essay, we will dive deeper into each topic throughout this essay.

Explanation:

This is was I put and I got 100%

Answer:

above answer is great

Explanation:

Briefly explain how ONE historical event or development in the period 1830 to 1860 that is not explicitly mentioned in the excerpts could be used to support Hahn’s interpretation.

Answers

The correct answer to this open question is the following.

You did not provide any excerpt, text, reference, or context to answer this question. That makes it difficult to exactly what you are referring to.

However, trying to help you and doing some research we can say the following.

One historical event or development in the period 1830 to 1860 that is not explicitly mentioned that could be used to support Hahn’s interpretation is how the United States became the engine of the ecom¿nomy of the planet because of its industrial capacity. How the Gross Domestic Product grew and the many opportunities the US offered to immigrants to work in major industries such as the Standard Oil Company of John F. Rockefeller, or the Steel company of Andrew Carnegie.

Innovations and the use of technology helped industries to earn more profits and invest that money in the creation of jobs and the spread of their operations nationwide.

A development in the period 1830 to 1860 that was not stated is the economic growth in the United States.

It should be noted that during the 80s, there was industrialization in the United States as several investors invested in the economy.

As a result of this, there was an increase in the gross domestic product of the country. This brought about economic growth and development in the country.

Read related link on:

https://brainly.com/question/15733898

How did Mansa Musa’s pilgrimage affect the evolution of Islam in Mali?



The influence of Islam waned as Mansa Musa became alienated due to his mistreatment by other Muslim leaders.

Mansa Musa sponsored the construction of mosques in Mali and established Timbuktu as a center for Islamic learning.

Islam became the official state religion of Mali, and those who practiced other religions were punished as criminals.

Reports of the pilgrimage increased support for Islam among commoners in Mali, but the elites continued to practice traditional African religions.

Answers

Answer:

B. Mansa Musa sponsored the construction of mosques in Mali and established Timbuktu as a center for Islamic learning.

What is dose response and explain how it is measured and why it varies between individuals?

Answers

Dose-response relationship, effect on an organism or, more specifically, on the risk of a defined outcome produced by a given amount of an agent or a level of exposure. A dose-response relationship is one in which increasing levels of exposure are associated with either an increasing or a decreasing risk of the outcome. Demonstration of a dose-response relationship is considered strong evidence for a causal relationship between the exposure and the outcome. The chance of a causal relationship cannot be disregarded, however, even when a dose-response relationship is absent.

Bonnie withdrew $1,200 from her savings account. She spent of the money on travel arrangements. She spent of the remaining amount at the hardware store. Finally, she treated her friend to lunch with some of the remaining money. After lunch, Bonnie had $300.50 left. How much money did Bonnie spend on lunch?
Bonnie spent $blank
on lunch.

Answers

Answer:

 hi do u no Sydni?

Explanation:

Compare the immigrant population of the United States with those of European countries and Middle Eastern countries. Which countries have the highest percentage of immigrants? Why? What are important differences between the immigrants to the United States and immigrants to the Middle East?

Answers

Answer:

An important differences between the immigrants to the United States and immigrants to the Middle East are discussed below in details.

Explanation:

Arab Americans draw their sources from 22 distinct nations of northern Africa and western Asia. Arab settlement to America relinquished meaningful balances in the late 19th century. Most of these initial immigrants (1880s-1920s) were weak and working-class Lebanese/Syrian Christians from hill villages.

Read the recipe for making brownies.

1 egg
1/2 cup of softened butter
2 cups flour
1 cup sugar
1 cup of sweetened cocoa
2 teaspoons baking soda
1 teaspoon salt

1. Preheat the oven to 350 degrees.
2. Mix the eggs and butter in a bowl until smooth.
3. Add the flour, sugar, cocoa, baking soda, and salt to the bowl.
4. Mix the ingredients until thick and creamy.
5. Pour the mixture into a 9x12-inch non-stick baking dish.
6. Bake for 25 minutes.
PLS HURRY IM TIMED (THIS IS FOR MY TEST)
A way to keep the brownies from burning is

using a larger baking dish.
using a smaller mixing bowl.
decreasing the baking time.
decreasing the amount of butter.

Answers

I would say using a larger baking dish or decreasing the baking time :) they both sound correct

The way to keep the brownies from burning is decreasing the baking time. Thus, option third is correct.

What is baking?

Baking is a form of cooking that employs dry heat, usually in an oven, but it can also be done in hot ashes or on hot stones. Bread is the most popular baked foodstuff, although many other items may be baked. Heat is gradually transported from the surface to the core of cakes, cookies, and slices of bread.

A chocolate brownie, often known as a brownie, is a baked chocolate treat. Brownies come in a range of shapes and sizes, and their density determines whether they are fudgey or cakey. Brownies' upper crusts frequently, but not always, feature a shiny "skin." Therefore, it can be concluded that option third is correct.

Learn more about baking here:

https://brainly.com/question/914928

#SPJ2

ALL POINTS IF YOU ANSWER HURRY DUE TODAY!!!!!!!!!!!!
ALSO I AM IN 7'TH GRADE AND TERRIBLE AT ALGEBRA

Answers

Answer: C

Explanation: It is correct

If the earth were to reverse its direction of rotation, which of these changes is likely to be observed

Answers

Answer:

If Earth stopped rotating, it would be a disaster but if it were to rotate backwards it might not be as catastrophic. Trade winds at the equator, which normally blow westward, would reverse - hurricanes would no longer travel from East to West across the Atlantic.

Explanation:

I majored in

hello help please
(What is energy?)​

Answers

Answer:

ans is a option

Explanation:

a change that appears in an object when force is applied

its d because they have to undergo a change and if a force is applied that kinetic energy

Maddie is studying for her final exams. Explain how the curve of forgetting, effortful processing, and distributed practice may impact her learning and performance on the exam.

Answers

Answer:

The curve of forgetting describes how we forget what we have learned as time passes. To decrease forgetfulness over the new information acquired, Maddie should use two strategies: distributed practice and effortful processing.

By using distributed practice, the curve of forgetting decreases, and she will effectively retain the information. This practice consists of reviewing the new information soon after Maddie learned to prevent a high lowering in the forgetting curve. Then, she should study the lesson again, and continue doing this but with long periods in between reviewings. The result is a reduction in the forgetting curve, and Maddie has encoded the information in her memory.

The second strategy is effortful processing. This technique consists of paying attention and make a conscious effort to retain the information and not forget it. By doing this, Maddie will decrease the forgetting rate.

If Maddie combines the knowledge about the forgetting curve with distributed practice and effortful processing, she will succeed in her final exams since she managed to encode the necessary information.

Explanation:                        

Psychologist Hermann Ebbinghaus created the forgetting curve after his investigation about memory and how we retain information. He found out that we remember what we have learned less as time goes by. But also that there are methods to prevent the loss of memory over time. Distributed practice, effortful learning, finding a purpose to retain the information and making the information clear, sleeping well, and being relaxed helps to encode it in our memory.

Based on the information given, it should be noted that the curve of forgetting describes how individual forgets what we have learned as time passes.

In order to reduce forgetfulness over the new information that one has acquired, it's important for Maddie to use distributed practice and effortful processing.

Distributed practice will help her effectively retain the information. Also, effortful processing consists of paying attention and making a conscious effort to retain the information and not forget it.

Learn more about performances on:

https://brainly.com/question/2498692

ASAP HELP PLSS

What is created when two continental plates collide (convergent plates)? Give an example where this is
occurring on Earth.

Answers

When two continental plates collide they create mountains. Volcanoes are one kind of feature that forms along convergent plate boundaries, where two tectonic plates collide and one moves beneath the other. Another example is the Himalaya Mountains. They result of this type of convergent plate boundary.

How have ICE’s immigration policies affected our tax base and economy?

Answers

Answer:

The immigration policies have had both positive and negative effects on our economy. The U.S. tax base has increased in order to allot more money towards border enforcements and to allow for legal immigrants to live in the country, however the U.S. avoidance of immigration reform has also led to lower wages, lower tax revenue and lower productivity which deepens a vicious cycle aimed at prospective immigrants. The U.S. economy goes further in debt to serve the needs of Non-American Aliens, however the introduction of legal aliens in the country allows for debt forgiveness for America, as they have more workers.

Explanation:

PLS HURRY THIS IS FOR MY TEST

Read the recipe for making brownies.

1 egg
1/2 cup of softened butter
2 cups flour
1 cup sugar
1 cup of sweetened cocoa
2 teaspoons baking soda
1 teaspoon salt

1. Preheat the oven to 350 degrees.
2. Mix the eggs and butter in a bowl until smooth.
3. Add the flour, sugar, cocoa, baking soda, and salt to the bowl.
4. Mix the ingredients until thick and creamy.
5. Pour the mixture into a 9x12-inch non-stick baking dish.
6. Bake for 25 minutes.

A way to keep the brownies from burning is

using a larger baking dish.
using a smaller mixing bowl.
decreasing the baking time.
decreasing the amount of butter.

Answers

Answer:

decreasing the amount of butter

Explanation:

I think it would be to decrease baking time cuz that makes the most sense

Identify types of toxic waste generated in a dental office

Answers

Answer:

Mercury-containing wastes. Dental Amalgam particles are a source of mercury which is known to be a neurotoxic, nephrotoxic, and bioaccumulative element.

Silver-containing wastes.

Lead-containing wastes.  

Blood-soaked/dripping gauze.

Sharps.

Chemicals, disinfectants, and sterilizing agents.

Nonhazardous wastes.

add up the total in each row of the tape diagram to determine how many quarts of blue and yellow pains the calry family needs.

Answers

Answer:

9 is a great answer to the question

How would a Supreme Court Justice use a strict construction of the
U.S. Constitution?

Answers

Strict construction requires a judge to apply the text only as it is written. Once the court has a clear meaning of the text, no further investigation is required. Judges—in this view—should avoid drawing inferences from a statute or constitution and focus only on the text itself.

Why did the Spanish economy begin to decline despite the influx of silver?

Answers

Answer:

Explanation:

The Spanish economy began to decline because they had never set tax rates on silver and only began doing so sixty years after its discovery, when the money was worth less than before. Along with this, Spain borrowed money from other countries which they could not pay back due to rebellions.

What is the correct formula for the value of the determinant?
la bl
|c d|

Answers

Answer:

[tex]D = ab - cd[/tex]

Explanation:

Given

[tex]\left[\begin{array}{cc}a&b\\c&d\end{array}\right][/tex]

Required

Determine the determinant

Represent the determinant with D

Since the above matrices is 2 by 2.

All we have to do is to multiply the alternate elements of the columns

i.e. (a * d) and (b * c)

Then subtract:

[tex]D = (a * d) - (b * c)[/tex]

Simplify

[tex]D = (ad) - (bc)[/tex]

[tex]D = ab - cd[/tex]

Answer:

C. ad - cb

Explanation:

How much should readers assume about a writer's real life? If we presume that it's possible to learn something about a writer through her work, what do the subjects of Dickinson's poem tell you about her as a person?

The poem I'm doing it on is There's a certain slant of light btw​

Answers

Answer:

The way I think readers assume about a writer's real life is when they add a lot of personal emotions to their stories, Dickinson's poems were considered romantic meaning she loved someone back in the day and wrote about it in her poems. A lot of readers tend to write out their problems including love life, personal family life in books or poems to express their feelings and that is what readers assume when reading a book. Another perfect example is William Shakespeares' love sonnets and his love drama and readers/audiences realized there was something going on in his life. A lot of readers/audiences (whether it is a film or book) assume an actor or writer puts in their own personal story and have their character act it out, letting out their emotions which brings a lot of different drama, love, power, etc.

Dickinson's poems also mentioned a lot of death in her poems which makes readers think someone she once loved died and she is expressing all of the emotions she kept hidden out in her poems.

Hope this helped :)


Create a new program in Repl.it called "Lists." Your goal for this program is to create
sections of code that will perform different outputs with the list called, names which
contains the following values - Peter, Bruce, Steve, Tony, Natasha, Clint, Wanda, Hope,
Danny, Carol and the list called numbers which contains the following values - 100, 50, 10,
1, 2, 7, 11, 17,53,-8, -4,-9,-72,-64, -80. At the beginning of your program, add in any
comments and create the two lists. Then create the following:
1. A loop that will output every other name in the names list.
2. A loop that will output only the positive numbers in the numbers list.
3. A loop that will output the sum of all the values in the numbers list.
4. A loop that will output only the numbers that are odd.
5. A loop that will output only the names that come before "Thor" in the alphabet from
the names list.
6. A loop that will find the maximum or minimum value in the numbers list. This algorithm
requires an additional variable that is assigned to the first element in the list. Then, in a
loop compare each element to the variable. If the element is > (for max) or < (for min),
assign the variable to the element. After the loop, print the variable.
HINT: len() is a helpful method that can be used on strings or lists to determine how
For lists that would mean how many elements are inside and for strings,

Answers

Answer:

Everything but Thor should be right

Explanation:

numberrs = 0

names = ["Peter","Bruce","Steve","Tony","Natasha","Clint","Wanda","Hope","Danny","Carol"]

numbers = [100,50,10,1,2,7,11,17,53,-8,-4,-9,-72,-64,-80]

for index, element in enumerate(names):

 if index %2 == 0:

  print(element)

for numberrs in numbers:

 if numberrs >= 0:

   print (numberrs, end = ' ')

average = sum(numbers) / len(numbers)

print(average)

for numberrs in list(numbers):

 if numberrs % 2 != 0:

   print (numberrs, end = ' ')

for TN in names:

 if TN == "Thor":

   break

else:

 print({TN})

maxmin = numbers[0]

for numberrs in numbers:

 if numberrs < maxmin:

   maxmin = numberrs

print (maxmin)

maxmin=numbers[0]

for numberrs in numbers:

 if numberrs > maxmin:

   maxmin = numberrs

print(maxmin)

The program is an illustration of loops and conditional statements.

Loops are used to perform iterations, while the execution of a conditional statement is dependent on its truth value

The program in Repl.it where comments are used to explain each line is as follows:

#This initializes numberrs to 0

numberrs = 0

#This initializes the name lists

names = ["Peter","Bruce","Steve","Tony","Natasha","Clint","Wanda","Hope","Danny","Carol"]

#This initializes the number lists

numbers = [100,50,10,1,2,7,11,17,53,-8,-4,-9,-72,-64,-80]

#This iterates through the names

for index, element in enumerate(names):

   #This prints every other names

   if index %2 == 0:

       print(element)

#This iterates through the numbers

for numberrs in numbers:

   #This prints all positive numbers

   if numberrs >= 0:

       print (numberrs, end = ' ')

#This calculates the average

average = sum(numbers) / len(numbers)

#This prints the average

print(average)

#This iterates through the numbers

for numberrs in list(numbers):

   #This prints odd numbers

   if numberrs % 2 != 0:

       print (numberrs, end = ' ')

#This iterates through the names

for TN in names:

   #This prints names that come before "Thor"

   if TN == "Thor":

       break

   else:

       print({TN})

#This initializes the minimum to 0

maxmin = numbers[0]

#This iterates through the numbers

for numberrs in numbers:

   #This determines the minimum of the list

   if numberrs < maxmin:

       maxmin = numberrs

#This prints the minimum of the list        

print(maxmin)

#This initializes the maximum to 0

maxmin=numbers[0]

#This iterates through the numbers

for numberrs in numbers:

   #This determines the maximum of the list

   if numberrs > maxmin:

       maxmin = numberrs

#This prints the minimum of the list

print(maxmin)

Read more about similar programs at:

https://brainly.com/question/17140981

explain how the two memory systems (automatic and effortful) processes work.

Answers

Answer:

endorsing the act of getting information into our memory systems are automatic and effortful processing storage is written in the information and retread is the act of getting information out of storage and into consideration awareness the RICO organization and read

Which if the following Confuscian practices were reinstituted by Emperor Hongwu after the collapse of the Yuan Dynasty??


Tightly restricting trade along the Silk Road

Providing more opportunities for woman

Declaring Buddhism to be the state religion

Using exams to select bureaucratic officials ​

Answers

Answer:

d. Using exams to select bureaucratic officials ​

Explanation:

took it

a bus is traveling 240 km in 6 hours what is the average speed of the bus

Answers

Answer:

40 mph

Explanation:

240 divided by 6 = 40

Answer - 40

Answer:

40 km per hour

Explanation:

240 ÷ 6 = 40

Prior to World War 1 which country had the most extensive overseas empire?​

Answers

Answer:

Mesopotamia

Good luck                

                 

if that is your map then it ts france

Ano - ano kaya ang maaring pagbabago sa katangiang pisikal at antas ng pag - iisip at moralidad nito sa teorya ng ebolusyon, ang tao ay dumaan sa mahabaat masalimuot na proseso ng ebolusyon, mula sa sinaunang unggoy patungo sa modernong tao sa kasalukyan.

Answers

Answer:

What could be the change in the physical characteristics and level of thought and morality in the theory of evolution, man went through a long and complicated process of evolution, from the ancient monkey to the modern man?

Explanation:

❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓❓

Which group was NOT one of the barbarian tribes that invaded the late
Roman Empire?

Answers

Answer:

Many of the groups that attacked and invaded the Roman Empire were Germanic tribes from Northern Europe. Goths - One of the most powerful and organized groups of barbarians were the Goths. The Goths were divided into two major branches: the Visigoths and the Ostrogoths.

Explanation:

what is 100/5x5/4x90/4

Answers

Answer:

0.027..

Explanation:

the answer is up at the top

The answer for 100/5x5/4x90/4 is 562.2
Other Questions
1/7 (63n-77)=11+9n please answer true or false: blood flow through the heart in two paths. The correct sequence for the general adaptation syndrome is:_________ a) Exhaustion phase, alarm phase and resistance phase b) Alarm phase, resistance phase and exhaustion phase c) Resistance phase, exhaustion phase and alarm phase d) Alarm phase, exhaustion phase and resistance phase A person on a moving sidewalk travels 36 feet in 6 seconds. The moving sidewalk has a length of 180 feet. How long will it take to move from one end to the other?Help pls? find the midpoint, multiple choice question Help pls I am in 4th and my sister is at school help What is the center of the circle shown below?. . . OD. Y For EF in triangle EFG, what is the corresponding segment in similar triangle HFG? Whats the different between yoga and power yoga Tom swam to the bottom of a swimming pool that was 9 feet deep and he touchedthe bottom. He swam back to the surface. How many feet did Tom swim? True or false: The British help the Indians at Fort Miami 6. An adult male red fox weighs 8 kg (kilograms). In order to maintain hisweight and survive, he needs to intake 59 Kcal/kg of body weight per day.This means he needs to consume 59 Kcal for every one kg of his bodyweight.How do we determine the number of Kcal per day for the fox? Help will mark brainliest!(ignore red) Which of the following apertures will give you the shallowest depth of field?a)2.8b)5.6c)11d)22e)250 points and brainliest look below help please 1/2(2c - 4) = 1/3(6c - 30)Please dont give me a wrong answer I do not know how to drive a car in the United Kingdom, on the left side of the road. (1 point) to knowOknow 1. *A car is going over the top of a hill whose curvature approximates a circle of radius 200 m. Atwhat velocity will the occupants of the car appear to weigh 20% less than their normal weight (ortheir normal weight times 0.8)? What is a Siege and how did this tactic and how did it play out during the Battle of Yorktown? (3 sentence minimum) The important point to make, and I cannot say it too often, is that music and art are important factors in a culture.where to place the eellipsis's in the sentence above?thanks in advance