Computer Science, asked by tulasi122001, 7 months ago

write a python program using for loop that loops over a sequence. what is a sequence?

Answers

Answered by phenomenals
4

Answer:

A loop is a used for iterating over a set of statements repeatedly. In Python we have three types of loops for, while and do-while. In this guide, we will learn for loop and the other two loops are covered in the separate tutorials.

Answered by Anonymous
0

Answer:

# Program to find the sum of all numbers stored in a list

# List of numbers

numbers = [6, 5, 3, 8, 4, 2, 5, 4, 11]

# variable to store the sum

sum = 0

# iterate over the list

for val in numbers:

sum = sum+val

print("The sum is", sum)

Similar questions