+ 3

Can Someone Help Me With This Python Script?

Well I have been trying to build this code but I got stuck at choice 3(choice 3 is something in the code) which is the edit character. But can someone help me make it, cause I have been trying for days. AFTER LOOKING AT THE SOURCE CODE YOU WILL UNDERSTAND WHAT I AM TALKING ABOUT. NOTE: CODE WILL NOT RUN ON SOLOLEARN, YOU HAVE TO RUN IT SOMEWHERE ELSE PLEASE HELP!!!! https://code.sololearn.com/cYhs2TwYKL0p/?ref=app

29th Oct 2017, 5:14 AM
Poet🎭
Poet🎭 - avatar
6 ответов
+ 7
What I am saying is the code seems bloated as you have to predict every possibility. If OOP is too hard for you at this time, maybe try thinking of a data structure capable of storing attribute-value pairs and defining functions like edit(attribute) to set/edit them. You only use it once in a loop then.
29th Oct 2017, 8:06 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 6
That code asks to be rewritten a bit. Try implementing a Player class with all attributes as a dictionary, so you can iterate through it with a loop asking for input.
29th Oct 2017, 7:23 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 2
Sorry very less knowledge about python3
29th Oct 2017, 5:39 AM
Sayantan Sinharay
Sayantan Sinharay - avatar
+ 2
Choice 1 and choice 2 work well but its choice 3 I am having problems with. Choice 4 is for later
29th Oct 2017, 7:39 AM
Poet🎭
Poet🎭 - avatar
+ 1
ok
29th Oct 2017, 6:37 AM
Poet🎭
Poet🎭 - avatar
+ 1
@Kuba Siekierzyñski I know the code is very messy, I don't really know how to use OOP and I have never used it before
29th Oct 2017, 7:38 AM
Poet🎭
Poet🎭 - avatar