From 270f14d0c5a58651b7aefbf23185689a6db4156c Mon Sep 17 00:00:00 2001 From: Stephen Kerr Date: Tue, 8 Nov 2022 12:23:14 +0100 Subject: [PATCH] wrote some python. added some txt files --- script.py | 13 +++++++++++++ text/{nouns.txt => games.txt} | 0 text/object.txt | 0 3 files changed, 13 insertions(+) rename text/{nouns.txt => games.txt} (100%) create mode 100644 text/object.txt diff --git a/script.py b/script.py index e69de29..680beb8 100644 --- a/script.py +++ b/script.py @@ -0,0 +1,13 @@ +#This is a script that writes rules and instructions +#First it sets variables +import random +games = ["backgammon", "pokemon", "war"] +object = ["teammate", "card", "turn", "place", "board", "dice", "nice", "backgammon"] +verb = ["choose", "pick", "give", "burn", "cut"] + +#Then it writes a title +print("How to play " + random.choice(games)) + +#Then it loops through instructions +for i in range(6): + print("Rule " + str(i+1) + ": "+ random.choice(verb) + " a " + random.choice(object)) diff --git a/text/nouns.txt b/text/games.txt similarity index 100% rename from text/nouns.txt rename to text/games.txt diff --git a/text/object.txt b/text/object.txt new file mode 100644 index 0000000..e69de29