Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 737 Bytes

README.md

File metadata and controls

32 lines (22 loc) · 737 Bytes

OOP Attack and win

python-oop: command-line program

41lines of code.

This simple command-line program in python shows how you can build a simple a command-line program in python using OOP concepts such as attributes, classes and methods.

How to execute this program

On the terminal, type the following command to run the program:

python3 oop-battle-win.py

Result is

...
Horee! Ravi/Vira menang!

CONCEPTS

  • Object-Oriented Programming in Python
  • game logic
  • self, other
  • init, str
  • While
  • import random

License

This code is open source. So feel free to use, modify, share, download as per your need. I do not take risk or responsibility for your errors or any commercial damage.