Write the code (Python) necessary to sum the elements of an list named: myLst Assume the list myLst has already been created and initialized Assume the constant SIZE has already been created and initialized with the number of elements in the myLst list. Complete the following tasks: Using a loop of your choice, O Output each element of the list myLst • Calculate the sum of the elements of the list myLst. Create any variables necessary to complete this task. Output the string "Sum is: " followed by the actual sum Note: Only submit the code necessary to complete this task. Do not create myLst or SIZE, as you are to assume they have already been created and assigned values.
Write the code (Python) necessary to sum the elements of an list named: myLst
Assume the list myLst has already been created and initialized
Assume the constant SIZE has already been created and initialized with the number of elements in the myLst list.
Complete the following tasks:
Using a loop of your choice,
O
Output each element of the list myLst
•
Calculate the sum of the elements of the list myLst. Create any variables necessary to complete this task.
Output the string "Sum is: " followed by the actual sum
Note: Only submit the code necessary to complete this task. Do not create myLst or SIZE, as you are to assume they have already been
created and assigned values.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images