Question: What is the correct Python code to add integers from 1 to 1 0 and store in the variable sum? Question 5 options: sum =
What is the correct Python code to add integers from to and store in the variable sum?
Question options:
sum
for i in range:
sum i
It cannot be done using the for loop in Python. A while loop should be used.
sum
for i in range:
sum i
sum
for i; i; i:
sum i
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
