Use the range() function to create the following list: [8,4,0,-4]
Answers
Answered by
48
Programming Language :- ۩
# printing a number
for i in range(10):
print(i, end =" ")
print()
# using range for iteration
l = [8,4,0,-4]
for i in range(len(l)):
print(l[i], end =" ")
print()
# performing sum of natural
# number
sum = 0
for i in range(1, 10):
sum = sum + i
print(" random numbers :", sum)
Function :- ()
[8,4,0,-4]
_______________________________________
Anonymous:
Awesome! :)
Answered by
17
Similar questions