Skip to content

Mismatched exercise requirement at part4, 3.Lists (Python programming 2026) #20

@Priyam-Analyse

Description

@Priyam-Analyse

In the part 4, lists, the programming exercise named "Addition and removal" has a faulty test. The description of the exercise asks us to print the list after every operation "The list is printed out in the beginning and after each operation", but during the tests performed in VS code, the code doesnt clear the tests as the number of lines (if the list is printed after every action) exceeds the required no. of rows.
example:
x=1
list=[]
while True:
y=x-2
print(f"The list is now {list}")
operation=input("a(d)d, (r)emove or e(x)it:")
if operation=="d":
list.append(x)
x+=1
# print(list) (commented out to match expected output)
elif operation=="r":
if len(list)>0:
list.pop(y)
# print(list) (commented out to match expected output)
x-=1
else:
continue
elif operation=="x":
print("Bye!")
break

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions