In: Computer Science
Write a loop to print a list of numbers starting at 64 and ending at 339. Justify your syntax.
Please upvote if you are able to understand this and if there is any query do mention it in the comment section.
CODE:
li = []#creating an empty list
for i in range(64, 340):#running a loop such it starts from 64 and
ends at 339
li.append(i)#appending numbers in the list
print(li)#printing list
OUTPUT:
In the above example, the i is the variable that is used for iteration in the for loop. The range function will run the loop from 64 and by excluding 340 will end at 339.
If this was supposed to be done in any other way or something more is required to be added then please mention it in the comment section otherwise please upvote.