backlinks to this page:
Github:
This is a python3 tutorial about two goblins doing role-playing game-combat. I explain everything in this tutorial very slow, since the title. This tutorial aims to:
This tutorial make use of the awesome technology of http://www.pythontutor.com/visualize.htm, enabling you to write, edit, run, debug and trace python code directly inside your browser. No installation or downloads necessary. All you need is a working internet connection.
However it is strongly recommended that if you can you are allowed you take those actions before starting:
:en:python:goblins
In this tutorial, there are no sound or graphics. Not even colored text. Look for other tutorials, like the pygame tutorial, instead if you can't life without colors. This tutorial is about simulating combat and number crunching mostly, as well as teaching you the necessary python skills to do so.
for
loop, while
loop, boolean expression break
range()
range()
if
elif
else
conditionalsTrue
, False
, pass
in
<
, >
, ==
, <=
, >=
or
, and
, not
import
random
modulerandom.randint()
, usning online documentationprint()
.format()
mini language, formatting numbers {:3d}
def
, return
, default argumentsclass()