Rock Paper Scissor with a CPU (console)
How do I improve the print_cpu_data function in the way it shows the information ?

Well, nowadays the most common architectural pattern (design scheme) for many projects is the MVC its principle is to separate the classes and code constructs in your project into 3 packages (model-view-controller)


In the model goes all the code which constitutes your application logic for example your class GameCpu
In the view goes the code which displays the information that the user is supposed to see in exmaple a class which uses tkinter, Pygame etc.
In the controller goes the code which allows communication between model and view.


You need to be aware that Desktop apps and Web apps have a different approach for the MVC due its nature.

If I wish to make a GUI for the game (e.g tkinter, Pygame, etc), what part of the code should be made into functions and how to do so efficiently ?

As I said, you could use an MVC pattern which is basically 3 packages named model, view, controller and import classes accordingly.

I believe your question is more likely to be answered with modularization and refactoring

Modularization is to split independent code blocs into functions, and refactoring is to simplify the code you have written.

Well, I hope it helped you, maybe you need a couple of youtube videos to understand how MVC works. I know, it seems more work, but when you are debugging medium to semi-large personal projects it is worthy, in great scale projects its indispensable. (not just MVC, to use an architectural pattern with an enterprise architecture [the names makes it sound complex but actually it isn't]).

Note: You may ask why did i not answered your first question, well, the code does not work when I execute it, so I can't make suggestions in the air, plus if I recommend a new form to solve this problem, many mods request answers to be bassed on the poster's code.