0

What do you think of this code and what are your suggestions for developing and modifying it?, How can I develop myself more?

https://sololearn.com/compiler-playground/cUxKrI36xtk9/?ref=app

19th Aug 2025, 10:24 PM
Mohamed A ElGwad
Mohamed A ElGwad - avatar
5 Antwoorden
+ 1
Python functions are conventionally written in lowercase. Classes are capitalized. if you're in an ide that have a code linter, you'll have squiggly lines under them. you're using f-string and string concatenation using randomly. it makes reading the code confusing. stick with f-string. my personal preference is to keep the code as simple as possible. just enough to get the job done.
19th Aug 2025, 11:03 PM
Bob_Li
Bob_Li - avatar
+ 1
this is valid f-string: print(f"{'='* 40}\n ")
19th Aug 2025, 11:23 PM
Bob_Li
Bob_Li - avatar
0
Bob_Li Actually I'm learning on my phone so far because I don't have a laptop but I'll really pay attention to what you say in the future. Are there any other mistakes I can avoid in the future or that will help me develop at the moment? Thank you very much for your advice🙏🏻
19th Aug 2025, 11:12 PM
Mohamed A ElGwad
Mohamed A ElGwad - avatar
0
Bob_Li But I didn't use string concatenation except in the separator. As for the f-string, do you mean that I should use it a little less? I think I didn't understand you well.
19th Aug 2025, 11:28 PM
Mohamed A ElGwad
Mohamed A ElGwad - avatar
0
Bob_Li Ok, now I understand you. I didn't know I could use the f-string like this. Thank you very much.
19th Aug 2025, 11:31 PM
Mohamed A ElGwad
Mohamed A ElGwad - avatar