Can you solve this challenging activity?


The complete program written in Python is as follows:
myList = []
num = 0
while num >= 0:
num = int(input())
myList.append(num)
myList.pop(len(myList)-1)
print(myList)
The program written in Python, where comments are used to explain each line is as follows:
#This initializes the list
myList = []
#This sets an input variable to 0
num = 0
#This following is repeated until the user enters a non-positive integer
while num >= 0:
#This gets the integer input
num = int(input())
#This appends the input to list
myList.append(num)
#This removes the last element (i.e. the negative number) in the list
myList.pop(len(myList)-1)
#This prints the list elements
print(myList)
Read more about python programs at:
https://brainly.com/question/26497128
#SPJ1