summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Sörnäs <gusso230@student.liu.se>2020-02-05 15:25:25 +0100
committerGustav Sörnäs <gusso230@student.liu.se>2020-02-05 15:25:25 +0100
commitbf125b50ddbd7550c757c716d736bc65ea1f0a25 (patch)
tree3112506ad7531e47506ff13b3488795155570f8b
parent6f3d4f70c8a57bf0bc01d510e3d27753fe0bfc5b (diff)
downloadtdde44-bf125b50ddbd7550c757c716d736bc65ea1f0a25.tar.gz
Fix uppgifter after split
-rw-r--r--upg1_3.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/upg1_3.py b/upg1_3.py
index f4f11c4..083612f 100644
--- a/upg1_3.py
+++ b/upg1_3.py
@@ -1,3 +1,5 @@
+import random
+
def concatenate_strings(string1, string2):
return string1 + string2
@@ -6,7 +8,7 @@ def use_the_linebreak():
return "rad 1\nrad 2"
def generate_pokemon_name(prefixes, suffixes):
- return concatenate_strings(select_random(prefixes), select_random(suffixes))
+ return concatenate_strings(random.choice(prefixes), random.choice(suffixes))
def first_word(s):
return s.split(" ")[0]