From bf125b50ddbd7550c757c716d736bc65ea1f0a25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Wed, 5 Feb 2020 15:25:25 +0100 Subject: Fix uppgifter after split --- upg1_3.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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] -- cgit v1.2.1