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 1

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)

Answer 2

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


Related Questions

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

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

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

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

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..

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

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:

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.

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

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:

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

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.

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:

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.

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:

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

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:

Select all of the answers that apply. Which of the following help create volcanoes? plate tectonics
landslides
cracks in Earth's crust
built up magma

WILL GIVE BRAINLIEST!!

Answers

probably plate tectonics because volcanos are formed from divergent boundaries

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 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 :)

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.

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

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.

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

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:

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

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.

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

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

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

Answers

They would have different thoughts and opinions on each

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.

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.

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:

Other Questions
please hurry!! Review each of the investment opportunities provided by Earll Investments and Pima Financial Trading. In at least two to three paragraphs, write an analysis of these opportunities that answers the following questions. What are the true risks of each investment, and do the companies accurately describe these risks? What are the potential returns of each investment, and do the companies accurately describe these returns? Based on the evidence available to you, which investment opportunity is more likely to be fraudulent? please be original What changes an object's speed and direction? *A. FrictionB. AccelerationC. GravityD. Inertia Can anybody answer these 2 please hurry Select the correct answer from each drop-down menu. Three Men in a Boat by Jerome K. Jerome (excerpt) Then a sweet young lady entered, leading a meek-looking little fox-terrier, and left him, chained up there, between the bull-dog and the poodle. He sat and looked about him for a minute. Then, without a word of warning, without the shadow of a , he bit that poodles near fore-leg, and a yelp of rang through the quiet shades of that lobby. The result of his first experiment seemed highly satisfactory to him, and he determined to go on and make things lively all round. He sprang over the poodle and attacked a collie, and the collie woke up, and commenced a fierce and noisy contest with the poodle. What Ming product became a very desirable luxury item in Europe during the Ming era? Long division 4/8,728 26. software that uses contour lines is often used in...A. product design B. creating 2D logos C. developing shading D. making photographs Which relationship between x and y in the equation shows a proportional relationship?y=3xy=5(r+3)y=x-2y=5x +3 3) A school bus traveling at 12 m/s has a momentum of 144,000 kg.m/s.What is the mass of the bus? Suppose the average farm owned by the farmers who joined Shays' Rebellion had an area of1,755,625 meters squared. If one such farm is in the shape of a square, what is the perimeter ofthe farm?HintA 10,600 metersB 2,650 metersC 1,325 metersD 5,300 meters Who was the First explorer to travel toIndia? if the pH of a substance is 3.2, is it an acid, base, or neutral? Where dose sound come from and how is it made and where can you not here sound A pharmacist put 2.415 ounces of vitamin pills into bottles. She put 0.023 ounces of vitaminpills into each bottle.How many bottles did the pharmacist use for these vitamin pills? Baramulla(a city in Jammu and Kashmir) population in 2015 What event led to the Persian Empire invading Greece?The Spartans attacked Persia to defend Athens.The Athenians attempted to kill Darius I to end his rule.The Ionians revolted against Persia with the support of Athens.The Persians attacked Greece to free Ionia from the rule of Athens. please help me :( Angharad sleeps for 8 hours each night, correct to the nearest 10 minutes.The total time she sleeps in the month of November (30 nights) is T hours.Between what limits does T lie? The Cherokee removal of 1838 took place during theautumn.winter.springsummer. How long does it take for 87.5 % of each isotope(Krypton-73, Krypton-74, Krypton-76, and Krypton-81) to decay? Why were the Philippines denied independence bythe United States?A. Wanted to expand the textile industry thereB. Needed the islands to open trade with ChinaC. There was lots of coal in the Philippines