Which of the following lines of code will work flawlessly when put independently inside the add_new() method in order to make the snippet’s output equal to [0, 1, 2]? (Choose two.)

Last Updated on December 8, 2021 by Admin 2

Which of the following lines of code will work flawlessly when put independently inside the add_new() method in order to make the snippet’s output equal to [0, 1, 2]? (Choose two.)

PCAP Certified Associate in Python Programming Part 06 Q04 088
PCAP Certified Associate in Python Programming Part 06 Q04 088
  • self.queue.append(self.get_last() + 1)
  • self.queue.append(get_last() + 1)
  • self.queue.append(self.queue[-1] + 1)
  • queue.append(self.get_last() + 1)
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments