4.9 Code Practice: Question 2
Instructions
Write code using the range function to add up the series 20, 30, 40, ... 90 and print the resulting sum each step along the way.

Expected Output
20
50
90
140
200
270
350
440

Answers

Answer 1

total = 0

for x in range(20,91,10):

   total += x

   print(total)

I hope this helps!

Answer 2

Answer:

sum = 0

for i in range (20, 91, 10):

  sum += i

  print(sum)


Related Questions

Other Questions
In science class, Blaines teacher puts one glow stick in a cup of hot water and another glow stick in a cup of cold water. She asks the students to think about how the temperature of the water will affect the chemical reaction that occurs inside the glow stick once it is bent and starts to glow.Which glow stick will be brighter once it is bent? Explain your answer. which is the line of best fit and why? IDK WHY T.F I'M ASKING BUT PLZ HELP FOR REALhow is the setting important in the gentleman of rio en medio? What is the most important part of community health - connection between individuals - affordable medical care - Active community politics - connection with other communities One-third of a number t is equal to 7.Write the word sentence as an equation then solve What does the director do to add to the mood and tone of The Diary of Anne Frank? Do you think cultural practices and traditions are still relevant in South Africa Today HELP ME RIGHT NOW PLEASE. . . Budget cuts always eliminate the least necessary. We drop premium cable before heat or electricity. Harvards decision [to close the primate research center] suggests that it, too, knows that primate research isnt a necessary expense or a justifiable cruelty. But the monkeys will not celebrate if sent to another lab, as planned. They deserve protection from further harmful research. Sanctuaries, with financing, would be able to take them. I hope that Harvard, which has profited plenty, will do the right thing: Retire the monkeys with the support necessary to live the rest of their lives in safety and comfort [in a primate nature preserve]. What is the claim of this article? a The main claim is We drop premium cable before heat or electricity. b The main claim is Harvard should retire the monkeys to a nature preserve. c There is no claim in this letter. What is 70% of 900Pls answer quickly Read the passage then answer the question below:The OrnithopterMany people know Leonardo da Vinci today as an artist, and it is true that he was indeed a great painter and sculptor, but he was also an inventor and one of the first individuals in recorded history to draft detailed plans for a flying machine.In order to make a living, Leonardo often depended upon wealthy individuals who would commission work from him. That means they would hire him and pay him to create specific work they wanted. In 1482, when he was 30 years old, Leonardo heard of an opportunity to work for Ludovico Sforza, the Duke of Milan. The duke, however, did not want a painter; he wanted a military engineer to help him defend the city against its enemies. This was an excellent opportunity that would pay Leonardo well, but Leonardo was a peaceful man. He considered war to be a beastly madness. He preferred to make things of beauty.Leonardo made the decision that he could tolerate making weapons if the resources the duke could provide would also allow him to create things he loved. He sent a letter to the duke detailing his skills in designing and building weapons. I will assemble catapults, mangonels, trebuchets and other instruments of wonderful efficiencyI will make an infinite number of items for attack and defense, he wrote.Leonardos letter convinced the duke of his talents, and he got the job. He set about designing the weapons that the duke desired. But Leonardo was infinitely creative, always thinking of new things, new ideashe could not be limited to weapons alone. One idea that he had not mentioned in his application was the ornithopter. It was not a weapon of war, and it was not something that the duke had asked for, but Leonardo went ahead and designed it anyway.Leonardo was fascinated by the idea of flight. The word ornithopter comes from two words meaning bird and wings. And on first inspection, his plans resembled a birds wings attached to a human beings arms. He concluded that a human beings arms were neither strong enough nor light enough to stay in the air for long. So, his design included sets of foot pedals and levers that were operated with the hands. He created detailed plans and presented them to the duke, uncertain of how the duke would react to a design for which he didnt ask.As it turned out, the duke was very impressed with the ornithopter, but it wasnt Leonardos innovation that excited him. He immediately thought of the ways this machine could be used in war. If a spy could fly over the enemys camp, imagine what information he could gather! This was not what Leonardo had intended for his beautiful flying machine.But how Leonardo felt about war turned out not to matter in the end. His ornithopter was never builtalong with his designs for tanks, parachutes, diving suits, machine guns, and even robots that he created for the duke. The ideas of Leonardo da Vinci were centuries ahead of the technology needed to make them.He concluded that a human being's arms were neither strong enough nor light enough to stay in the air for long. So, his design included foot pedals and levers that were operated with the hands.Which type of conflict is expressed in this excerpt?Question 8 options:individual vs. societyindividual vs. individualindividual vs. selfindividual vs. nature Para qu crees que es til levantar encuestas entre la poblacin? If solving a system of linear equations by elimination or substitution I get that 2=3, it means (check all that apply)If the system of equations is 2 linear equations in 2 variables, there is infinity number of solutionsIf the system of equations is 3 linear equations in 3 variables, there is infinity number of solutionsIf the system of equations is 2 linear equations in 2 variables, the system has no solutionsIf the system of equations is 3 linear equations in 3 variables, the system has no solutions Helen has just been diagnosed with hirsutism. Which symptoms does she most likely have?A. hair growth on her face and chestB. an inflamed rash on her backC. spots of baldness on her headD. inflammation of her nail matrix "Can dogs identify colors?" is an example of a scientific question. "Are dogs better pets than cats?" is not. Use complete sentences to explain the difference between these questions and why only one is scientific. (5 points) Your answer: If anyone wants to do this then go ahead. I would appreciate it. If not, well, i dont blame you.p.s. doesn't have to be good at all.Write a paragraph explaining what you feel is going to happen to you nowthat the 13 th Amendment has ended slavery (1865). What are you going to do? Thenproject ten years into the future (1875). Write a second paragraph that tells howReconstruction is either meeting your expectations or is a disappointment to you. Write a final paragraph to conclude your opinion of Reconstruction. Do you feel like you arebetter off now as opposed to the days before when you were a slave?Each of the three paragraphs should include at least one historically accurateevent as evidence in support of your opinions Turn all these sequences into Mrna instead of DNAAmino Acid SequenceMET-VAL- SER-LEU-STOPMET-VAL-SER-LYS-STOPMET-LEU-LEU-LEU-PRO-STOPMET-LEU-LEU-SER-ALA-STOPMET-ALA-VAL-VAL-STOPMET-VAL- ALA-ALA-STOP Fill in the table using this function rule.y=-3x + 5 Help me plz!!!!!Compare the origins and central ideas of Buddhism and Hinduism. Describe at least one similarity and one difference between the religions origins and beliefs. Be sure to clearly develop and organize your ideas, use supporting evidence from the unit, use correct grammar, spelling, and sentence construction. (4 points) Which would be the best concluding sentence?Tom wrote this paragraph:Eating at Joe's Pizza Place is a delightful experience.The food is freshly prepared right there in thekitchen. Joe uses only the freshest ingredients andmakes his own tomato sauce. He even makeshomemade sausage.O Joe's wife, Emma, has decorated the restaurantwith great care.O A mural on the wall shows Joe making his tomatosauce at the Pizza Place.O Joe also keeps a close eye on the servers andmakes sure customers are happy.O Anyone who enjoys great food should plan a visit toJoe's Pizza Place.lol When their is a new moon the sun and moon are on the same side of the earth this leads to a combination of gravitational forces causing usually high tides calledNeap tides Low tidesSupreme tides Spring tides