Portfolio Project Terminal Game

I just finished my portfolio project and it was fun and my code works great but I know I can do better. I would love feedback on my code.

Check out my code here

A little snippet of my post on Medium
“Academia Kaisen, players would answer questions to win points towards theit total HP. They would also get Action Points which would allow them to heal themselves or attack the other player. It’s either one or the other.”

1 Like

Hi, nice code. I kept playing with it for a while.
Just for practicing i made a fork and submitted a pull request to the project.
.
I found clever the way you wrote the questions and answers as a Dict.
I just changed a lil bit the data structure so the program can dynamically check for the True answer when multiple options.
.
If you want you can check my project, i also made a questions/answers script, a bit different tho.
Have a nice day!

Hello, I’m currently learning how to code in Python… I’ve been studying/practicing since the beginning of 2024. I’m impressed with the code you guys have provided. Do you happen to have any advice for a newcomer to the field?

Hi, I’m Andy. One suggestion that helped me in the learning process (wich by the way never ends) is to not trying to memorize the code but instead focusing on understanding the underlying concepts that make the code implementation works. Dont Jump straight into the text editor but take some time to write down the steps needed to complete a task.
The second suggestion is always try to use effective names for variables even though they seems too long…variables names like (x, y, ,z) could work for coordinates but not for functions variables names for example.
Happy coding

1 Like

Yaron here,

My advice is to code how you kno. Think of it as a spoken language, when you start off… you won’t be able to fully express yourself… But you can still express yourself. Learn to understand the code. It would be bad to copy something or use something you don’t know, could even break your original code to a point where you can’t fix it. I promise you it is better to just start with what you know and see how well you can work on different projects with what you know. Even if it may seem simple, a working code is a working code. This is all just simple problem solving and implementation. Work on the basics while slowly incorporating new ideas and styles and without even realising it, you can express yourself better than wen u first started.

Also don’t give up… You got this

1 Like