Seudónimo Seudónimo
  • 19-10-2020
  • Computers and Technology
contestada

1) Write a program that prints the sum of the first ten positive integers, 1+2+...+10
I don’t know how to write the code for python

Respuesta :

Cytokine
Cytokine Cytokine
  • 19-10-2020

total = 0

for i in range(1, 11):

   total += i

print(total)

Ver imagen Cytokine
Answer Link

Otras preguntas

Find the 58th term of the following arithmetic sequence.18,25,32,39
What is 356g to kg? (Dimensional Analysis)
Chantal has frontal lobe damage. She is doing a problem-solving task in which she has to choose the red object out of many choices. She can easily complete this
Find the distance between (-2,4) and (3,-2): 5 units 61 units 7.8 units 2.2 units using Pythagorean Theorem
What is x equal to in the problem 10+3(x+2)=36? Please show your work.
The temperature in the morning was -3.The temperature dropped 11 degrees by night. What was the temperature at night ?
What is the value of the fourth term in a geometric sequence for which a = 10 and r=0.5?
A a nuclear beta decay B a nuclear alpha decay C a physical phase change D a chemical decomposition
If a gamete has 10 autosomal chromosomes and 1 sex chromosome, how many chromosomes will be in the body cells of this organism?
A video game randomly chooses the colors of your character’s shirt and pants. The probability that you get a blue shirt is 0.18. The probability that you get a