5 Answers
+ 2
Whenever you call c.next() the last element is dropped.
If you compare c.next() == "general" then the last element is dropped even if it's "technical". Then thebelif-part is evaluated: again, the last element is dropped. All this before the next iteration of while loop.
So in this case you drop one too many.
+ 3
while not c.is_empty():
tem = c.next()
if (tem == 'general'):
total += 5
elif (tem == 'technical'):
total += 10
else:
pass
print(total)
+ 1
Probably we can solve it :)
Please link your code attempt and explain the task!
+ 1
Lisa have commented the problem statement in the code above