Guys help me to find bug in this code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1
11th Sep 2023, 4:26 PM
RAJ SONI😈😈
RAJ SONI😈😈 - avatar
3 Answers
+ 6
RAJ SONI😈😈 , you can run a loop inside your code, so that the user can select a distinct function. see a sample in the file, you have to complete it so that it runs properly: https://code.sololearn.com/c0kJ7ms0V1o6/?ref=app
12th Sep 2023, 1:59 PM
Lothar
Lothar - avatar
+ 4
RAJ SONI😈😈 , Short overview what the code is doing: > In function push(): An input (integer number) is taken and stored in the empty list `stk`. > In function pop(): The list method pop() is called, that will remove the last element from the list `stk`. After this, the list is empty, since in the first step only one element was appended to `stk`. > In function display()): Since the list `stk` is empty, nothing will be output. Can you tell me what your code should be doing exactly?
11th Sep 2023, 6:13 PM
sandra
sandra - avatar
+ 2
I want to make a stack ( in which i can add value or remove )
12th Sep 2023, 12:51 AM
RAJ SONI😈😈
RAJ SONI😈😈 - avatar