0

Creat list with def function in python

I have a question. I want to write a function that takes a blank list, adds the word "Add" to the list and if "End" is printed, asks me whether i want to add, delete or seach the list. Please help!

14th Sep 2022, 7:07 AM
Fardin mn
Fardin mn - avatar
14 Réponses
+ 3
Please, read lesson 37.1 python for beginners course
14th Sep 2022, 8:22 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 3
Fardin mn understand, there is no service for writing ready-made solutions for you and solving your homework. here is a place where people who are passionate about programming on a voluntary basis pull up newcomers who strive for knowledge and show it in practice. so far, we dont see that you have made any effort. no one will be able to learn the material instead of you. you have to go this way yourself.
14th Sep 2022, 5:02 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 2
Hi! What help do you need?
14th Sep 2022, 7:10 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 2
Hi, please post your written code so that it can be corrected or a suggestion on how to revise your code will be given. Try your best to write the code even though there are bugs, this is the way we learn here. Good luck. Thanks.
14th Sep 2022, 4:28 PM
Cris Tradio
Cris Tradio - avatar
+ 2
def list():     list_name=[]     def add():         names=input("enter a name: ")         while names!="e":             list_name.append(names)             names=input("enter a name: ")         print(list_name)     add()     def remove():         x=input("enter a name that is erased : ")         if x==i:             for i in range(len(list_name)):                 list_name.remove(x)         print(list_name)     remove() list()
14th Sep 2022, 5:43 PM
Fardin mn
Fardin mn - avatar
+ 1
The algorithm is like this: 1)create a empty list 2)add some name to the list 3)if the word "e" is written dont add anything anymore 4)ask wheather delete ,add or search the list A function should be defined for all of them
14th Sep 2022, 4:41 PM
Fardin mn
Fardin mn - avatar
0
I want to know how this function is written
14th Sep 2022, 7:26 AM
Fardin mn
Fardin mn - avatar
0
Sorry, i forgot to say hello
14th Sep 2022, 7:35 AM
Fardin mn
Fardin mn - avatar
0
Please write down if i can see where i am wrong
14th Sep 2022, 4:24 PM
Fardin mn
Fardin mn - avatar
0
I am very very noob and newcomer
14th Sep 2022, 6:11 PM
Fardin mn
Fardin mn - avatar
0
And i need your help
14th Sep 2022, 6:12 PM
Fardin mn
Fardin mn - avatar
0
I'm so sorry for taking your time and thanks. If you now better solution for my problem i will be thankful if you let me now
14th Sep 2022, 6:18 PM
Fardin mn
Fardin mn - avatar
0
Well I thing you have to understant what is class. Class contains funcions.
16th Sep 2022, 4:27 AM
Filip Dobeš
- 9
I need the written code
14th Sep 2022, 10:12 AM
Fardin mn
Fardin mn - avatar