Repository: hedyorg/hedy

Issue:
Make "Loop over list" level 8
It is now level 19 but it would be a great intermediate step before going to `for`.

We would then have these separate forms:
* repeat 5 times (level; 5 and 7)
* repeat kleur in lijstje (new level 8)
* for kleur in lijstje (level 9)
* for i in range(10): (higher levels)


Discussion:

Resolving patch:
diff --git a/hedy.py b/hedy.py
--- a/hedy.py
+++ b/hedy.py
@@ -1,3 +1,5 @@
+import textwrap
+
 from lark import Lark
 from lark.exceptions import LarkError, UnexpectedEOF, UnexpectedCharacters
 from lark import Tree, Transformer, visitors
@@ -8,7 +10,7 @@
 import re
 
 # Some useful constants
-HEDY_MAX_LEVEL = 22
+HEDY_MAX_LEVEL = 23
 MAX_LINES = 100
 
 #dictionary to store transpilers
@@ -862,6 +864,17 @@ def var_access(self, args):
 
 @hedy_transpiler(level=8)
 class ConvertToPython_8(ConvertToPython_7):
+    def repeat_list(self, args):
+      args = [a for a in args if a != ""]  # filter out in|dedent tokens
+
+      body = "\n".join([indent(x) for x in args[2:]])
+
+      return f"for {args[0]} in {args[1]}:\n{body}"
+
+
+
+@hedy_transpiler(level=9)
+class ConvertToPython_9(ConvertToPython_8):
     def for_loop(self, args):
         args = [a for a in args if a != ""]  # filter out in|dedent tokens
         body = "\n".join([indent(x) for x in args[3:]])
@@ -869,16 +882,16 @@ def for_loop(self, args):
         return f"""{stepvar_name} = 1 if int({args[1]}) < int({args[2]}) else -1
 for {args[0]} in range(int({args[1]}), int({args[2]}) + {stepvar_name}, {stepvar_name}):
 {body}"""
-@hedy_transpiler(level=9)
 @hedy_transpiler(level=10)
-class ConvertToPython_9_10(ConvertToPython_8):
+@hedy_transpiler(level=11)
+class ConvertToPython_10_11(ConvertToPython_9):
     def elifs(self, args):
         args = [a for a in args if a != ""]  # filter out in|dedent tokens
         all_lines = [indent(x) for x in args[1:]]
         return "\nelif " + args[0] + ":\n" + "\n".join(all_lines)
 
-@hedy_transpiler(level=11)
-class ConvertToPython_11(ConvertToPython_9_10):
+@hedy_transpiler(level=12)
+class ConvertToPython_12(ConvertToPython_10_11):
     def input(self, args):
         args_new = []
         var = args[0]
@@ -892,8 +905,8 @@ def input(self, args):
 
         return f'{var} = input(' + '+'.join(args_new) + ")"
 
-@hedy_transpiler(level=12)
-class ConvertToPython_12(ConvertToPython_11):
+@hedy_transpiler(level=13)
+class ConvertToPython_13(ConvertToPython_12):
     def assign_list(self, args):
         parameter = args[0]
         values = [a for a in args[1:]]
@@ -917,8 +930,8 @@ def change_list_item(self, args):
         return args[0] + '[' + args[1] + '-1] = ' + args[2]
 # Custom transformer that can both be used bottom-up or top-down
 
-@hedy_transpiler(level=13)
-class ConvertToPython_13(ConvertToPython_12):
+@hedy_transpiler(level=14)
+class ConvertToPython_14(ConvertToPython_13):
     def assign(self, args):  # TODO: needs to be merged with 6, when 6 is improved to with printing expressions directly
         if len(args) == 2:
             parameter = args[0]
@@ -953,20 +966,20 @@ def equality_check(self, args):
         else:
             return f"str({arg0}) == str({arg1})" #no and statements
 
-@hedy_transpiler(level=14)
-class ConvertToPython_14(ConvertToPython_13):
+@hedy_transpiler(level=15)
+class ConvertToPython_15(ConvertToPython_14):
     def andcondition(self, args):
         return ' and '.join(args)
     def orcondition(self, args):
         return ' or '.join(args)
 
-@hedy_transpiler(level=15)
-class ConvertToPython_15(ConvertToPython_14):
+@hedy_transpiler(level=16)
+class ConvertToPython_16(ConvertToPython_15):
     def comment(self, args):
         return f"# {args}"
 
-@hedy_transpiler(level=16)
-class ConvertToPython_16(ConvertToPython_15):
+@hedy_transpiler(level=17)
+class ConvertToPython_17(ConvertToPython_16):
     def smaller(self, args):
         arg0 = process_variable(args[0], self.lookup)
         arg1 = process_variable(args[1], self.lookup)
@@ -983,16 +996,16 @@ def bigger(self, args):
         else:
             return f"int({arg0}) > int({arg1}) and {args[2]}"
 
-@hedy_transpiler(level=17)
-class ConvertToPython_17(ConvertToPython_16):
+@hedy_transpiler(level=18)
+class ConvertToPython_18(ConvertToPython_17):
     def while_loop(self, args):
         args = [a for a in args if a != ""]  # filter out in|dedent tokens
         all_lines = [indent(x) for x in args[1:]]
         return "while " + args[0] + ":\n"+"\n".join(all_lines)
 
-@hedy_transpiler(level=18)
 @hedy_transpiler(level=19)
-class ConvertToPython_18_19(ConvertToPython_17):
+@hedy_transpiler(level=20)
+class ConvertToPython_19_20(ConvertToPython_18):
     def length(self, args):
         arg0 = args[0]
         return f"len({arg0})"
@@ -1020,8 +1033,8 @@ def assign(self, args):  # TODO: needs to be merged with 6, when 6 is improved t
             values = args[1:]
             return parameter + " = [" + ", ".join(values) + "]"
 
-@hedy_transpiler(level=20)
-class ConvertToPython_20(ConvertToPython_18_19):
+@hedy_transpiler(level=21)
+class ConvertToPython_21(ConvertToPython_19_20):
     def equality_check(self, args):
         if type(args[0]) is Tree:
             return args[0].children + " == int(" + args[1] + ")"
@@ -1036,8 +1049,8 @@ def equality_check(self, args):
         else:
             return f"str({arg0}) == str({arg1})"  # no and statements
 
-@hedy_transpiler(level=21)
-class ConvertToPython_21(ConvertToPython_20):
+@hedy_transpiler(level=22)
+class ConvertToPython_22(ConvertToPython_21):
     def not_equal(self, args):
         arg0 = process_variable(args[0], self.lookup)
         arg1 = process_variable(args[1], self.lookup)
@@ -1046,8 +1059,8 @@ def not_equal(self, args):
         else:
             return f"str({arg0}) != str({arg1}) and {args[2]}"
 
-@hedy_transpiler(level=22)
-class ConvertToPython_22(ConvertToPython_21):
+@hedy_transpiler(level=23)
+class ConvertToPython_23(ConvertToPython_22):
     def smaller_equal(self, args):
         arg0 = process_variable(args[0], self.lookup)
         arg1 = process_variable(args[1], self.lookup)
@@ -1334,8 +1347,6 @@ def transpile_inner(input_string, level):
         # random.choice(প্রাণী)
         hashed_lookups = AllAssignmentCommandsHashed().transform(abstract_syntaxtree)
 
-        if lookup_table != hashed_lookups:
-            print(lookup_table, hashed_lookups)
         lookup_table += hashed_lookups
 
     except UnexpectedCharacters as e:
@@ -1395,7 +1406,7 @@ def transpile_inner(input_string, level):
             transpiler = TRANSPILER_LOOKUP[level]
             python = transpiler(punctuation_symbols, lookup_table).transform(abstract_syntaxtree)
         else:
-           raise Exception('Levels over 22 are not implemented yet')
+           raise Exception(f'Levels over {HEDY_MAX_LEVEL} not implemented yet')
     except visitors.VisitError as E:
         # Exceptions raised inside visitors are wrapped inside VisitError. Unwrap it if it is a
         # HedyException to show the intended error message.


Test patch:
diff --git a/tests/tests_level_01.py b/tests/tests_level_01.py
--- a/tests/tests_level_01.py
+++ b/tests/tests_level_01.py
@@ -25,7 +25,7 @@ def run_code(self, parse_result):
       exec(code)
     return out.getvalue().strip()
 
-  def test_name(self):
+  def name(self):
     return inspect.stack()[1][3]
 
   def is_not_turtle(self):
@@ -268,7 +268,7 @@ def test_forward_turn_combined(self):
       code=code,
       expected=expected,
       extra_check_function=self.is_turtle(),
-      test_name=self.test_name()
+      test_name=self.name()
     )
 
   # negative tests
@@ -324,14 +324,14 @@ def test_print_without_argument_gives_incomplete(self):
       max_level=22,
       code="print",
       exception=hedy.IncompleteCommandException,
-      test_name=self.test_name()
+      test_name=self.name()
     )
   def test_non_keyword_with_argument_gives_invalid(self):
     self.multi_level_tester(
       max_level=22,
       code="abc felienne 123",
       exception=hedy.InvalidCommandException,
-      test_name=self.test_name()
+      test_name=self.name()
     )
 
 
diff --git a/tests/tests_level_02.py b/tests/tests_level_02.py
--- a/tests/tests_level_02.py
+++ b/tests/tests_level_02.py
@@ -360,7 +360,7 @@ def test_print_list_random(self):
       code=code,
       expected=expected,
       extra_check_function=check_in_list,
-      test_name=self.test_name()
+      test_name=self.name()
     )
   def test_assign_print_punctuation(self):
     code = textwrap.dedent("""\
@@ -435,7 +435,7 @@ def test_ask_without_argument_upto_22(self):
       code="name is ask",
       max_level=10,
       exception=hedy.IncompleteCommandException,
-      test_name=self.test_name()
+      test_name=self.name()
     )
 
   # test for 297 (not easy to fix, not giving prio now)
diff --git a/tests/tests_level_03.py b/tests/tests_level_03.py
--- a/tests/tests_level_03.py
+++ b/tests/tests_level_03.py
@@ -66,7 +66,7 @@ def test_print_two_spaces(self):
       code=code,
       max_level=4,
       expected=expected,
-      test_name=self.test_name(),
+      test_name=self.name(),
       extra_check_function=self.is_not_turtle()
     )
   def test_print_with_slashes(self):
@@ -263,7 +263,7 @@ def test_forward_ask(self):
       code=code,
       expected=expected,
       extra_check_function=self.is_turtle(),
-      test_name=self.test_name()
+      test_name=self.name()
     )
   def test_assign_print(self):
     code = textwrap.dedent("""\
@@ -279,7 +279,7 @@ def test_assign_print(self):
       code=code,
       expected=expected,
       extra_check_function=self.is_not_turtle(),
-      test_name=self.test_name()
+      test_name=self.name()
     )
 
   #negative tests
@@ -318,8 +318,8 @@ def test_missing_all_quotes(self):
     self.multi_level_tester(
       code=code,
       max_level=4,
+      test_name=self.name(),
       exception=hedy.UndefinedVarException,
-      test_name=self.test_name()
     )
 
   #assorti
diff --git a/tests/tests_level_04.py b/tests/tests_level_04.py
--- a/tests/tests_level_04.py
+++ b/tests/tests_level_04.py
@@ -192,7 +192,7 @@ def test_print_if_else_with_line_break(self):
       max_level=4,
       code=code,
       expected=expected,
-      test_name=self.test_name(),
+      test_name=self.name(),
       extra_check_function=self.is_not_turtle()
     )
   def test_print_if_else_line_break_and_space(self):
@@ -216,7 +216,7 @@ def test_print_if_else_line_break_and_space(self):
       max_level=4,
       code=code,
       expected=expected,
-      test_name=self.test_name(),
+      test_name=self.name(),
       extra_check_function=self.is_not_turtle()
     )
   def test_print_if_else_and_var(self):
@@ -292,6 +292,13 @@ def test_ifelse_should_go_before_assign(self):
         antwoord = 'stom'
       print(f'{antwoord}')""")
 
+    self.multi_level_tester(
+      max_level=4,
+      code=code,
+      expected=expected,
+      extra_check_function=self.is_not_turtle(),
+      test_name=self.name()
+    )
 
   #negative tests
   def test_indent_gives_parse_error(self):
@@ -318,7 +325,7 @@ def test_no_space_after_keyword_gives_invalid(self):
       max_level=22,
       code=code,
       exception=hedy.InvalidCommandException,
-      test_name=self.test_name()
+      test_name=self.name()
     )
 
     #we don't have a function now for testing more exceptoion logic
diff --git a/tests/tests_level_05.py b/tests/tests_level_05.py
--- a/tests/tests_level_05.py
+++ b/tests/tests_level_05.py
@@ -22,7 +22,7 @@ def test_assign_print(self):
       code=code,
       expected=expected,
       extra_check_function=self.is_not_turtle(),
-      test_name=self.test_name()
+      test_name=self.name()
     )
 
 
@@ -118,7 +118,7 @@ def test_print_if_else_with_line_break(self):
       max_level=6,
       code=code,
       expected=expected,
-      test_name=self.test_name(),
+      test_name=self.name(),
       extra_check_function=self.is_not_turtle()
     )
 
@@ -144,7 +144,7 @@ def test_print_if_else_with_line_break_and_space(self):
       max_level=6,
       code=code,
       expected=expected,
-      test_name=self.test_name(),
+      test_name=self.name(),
       extra_check_function=self.is_not_turtle()
     )
 
diff --git a/tests/tests_level_06.py b/tests/tests_level_06.py
--- a/tests/tests_level_06.py
+++ b/tests/tests_level_06.py
@@ -215,7 +215,7 @@ def test_random(self):
       max_level=10,
       code=code,
       expected=expected,
-      test_name=self.test_name(),
+      test_name=self.name(),
       extra_check_function=check_in_list
     )
 
diff --git a/tests/tests_level_07.py b/tests/tests_level_07.py
--- a/tests/tests_level_07.py
+++ b/tests/tests_level_07.py
@@ -2,7 +2,7 @@
 import textwrap
 from tests_level_01 import HedyTester
 
-class TestsLevel2(HedyTester):
+class TestsLevel7(HedyTester):
   level = 7
   
   def test_print(self):
@@ -261,7 +261,7 @@ def test_allow_space_after_else_line(self):
       max_level=8,
       code=code,
       expected=expected,
-      test_name=self.test_name()
+      test_name=self.name()
     )
 
 
diff --git a/tests/tests_level_08.py b/tests/tests_level_08.py
--- a/tests/tests_level_08.py
+++ b/tests/tests_level_08.py
@@ -5,257 +5,39 @@
 class TestsLevel8(HedyTester):
   level = 8
   
-  def test_print(self):
-    result = hedy.transpile("print 'ik heet'", self.level)
-    expected = "print('ik heet')"
-    self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
-
-  def test_print_with_var(self):
-    result = hedy.transpile("naam is Hedy\nprint 'ik heet' naam", self.level)
-    expected = "naam = 'Hedy'\nprint('ik heet'+str(naam))"
-    self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
-
-  def test_print_with_calc_no_spaces(self):
-    result = hedy.transpile("print '5 keer 5 is ' 5*5", self.level)
-    expected = "print('5 keer 5 is '+str(int(5) * int(5)))"
-    self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
-
-  def test_print_calculation_times_directly(self):
-    code = textwrap.dedent("""\
-    nummer is 5
-    nummertwee is 6
-    print nummer * nummertwee""")
-
-    result = hedy.transpile(code, self.level)
-
-    expected = textwrap.dedent("""\
-    nummer = '5'
-    nummertwee = '6'
-    print(str(int(nummer) * int(nummertwee)))""")
-
-    self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
-
-    self.assertEqual("30", self.run_code(result))
-
-  def test_ask(self):
-    result = hedy.transpile("antwoord is ask 'wat is je lievelingskleur?'", self.level)
-    expected = "antwoord = input('wat is je lievelingskleur?')"
-    self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
-
-  def test_if_with_indent(self):
-    code = textwrap.dedent("""\
-    naam is Hedy
-    if naam is Hedy
-        print 'koekoek'""")
-    expected = textwrap.dedent("""\
-    naam = 'Hedy'
-    if str(naam) == str('Hedy'):
-      print('koekoek')""")
-    result = hedy.transpile(code, self.level)
-
-    self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
-
-  def test_if_else(self):
-    code = textwrap.dedent("""\
-    antwoord is ask 'Hoeveel is 10 plus 10?'
-    if antwoord is 20
-        print 'Goedzo!'
-        print 'Het antwoord was inderdaad ' antwoord
-    else
-        print 'Foutje'
-        print 'Het antwoord moest zijn ' antwoord""")
-
-    expected = textwrap.dedent("""\
-    antwoord = input('Hoeveel is 10 plus 10?')
-    if str(antwoord) == str('20'):
-      print('Goedzo!')
-      print('Het antwoord was inderdaad '+str(antwoord))
-    else:
-      print('Foutje')
-      print('Het antwoord moest zijn '+str(antwoord))""")
-
-    result = hedy.transpile(code, self.level)
-
-    self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
-
-  def test_print_random(self):
-    code = textwrap.dedent("""\
-    keuzes is steen, schaar, papier
-    computerkeuze is keuzes at random
-    print 'computer koos ' computerkeuze""")
-    expected = textwrap.dedent("""\
-    keuzes = ['steen', 'schaar', 'papier']
-    computerkeuze=random.choice(keuzes)
-    print('computer koos '+str(computerkeuze))""")
-    result = hedy.transpile(code, self.level)
-
-    self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
-
-  def test_for_loop(self):
-    code = textwrap.dedent("""\
-    a is 2
-    a is 3
-    for a in range 2 to 4
-      a is a + 2
-      b is b + 2""")
-    expected = textwrap.dedent("""\
-    a = '2'
-    a = '3'
-    step = 1 if int(2) < int(4) else -1
-    for a in range(int(2), int(4) + step, step):
-      a = int(a) + int(2)
-      b = int(b) + int(2)""")
-
-    result = hedy.transpile(code, self.level)
-
-    self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
-
-  def test_if__else(self):
-    code = textwrap.dedent("""\
-    a is 5
-    if a is 1
-      x is 2
-    else
-      x is 222""")
-    expected = textwrap.dedent("""\
-    a = '5'
-    if str(a) == str('1'):
-      x = '2'
-    else:
-      x = '222'""")
-
-    result = hedy.transpile(code, self.level)
-
-    self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
-
-  def test_forloop(self):
-    code = textwrap.dedent("""\
-    for i in range 1 to 10
-      print i
-    print 'wie niet weg is is gezien'""")
-    expected = textwrap.dedent("""\
-    step = 1 if int(1) < int(10) else -1
-    for i in range(int(1), int(10) + step, step):
-      print(str(i))
-    print('wie niet weg is is gezien')""")
-
-    result = hedy.transpile(code, self.level)
-
-    self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
-
-
-  def test_reverse_range(self):
+  def test_for_list(self):
     code = textwrap.dedent("""\
-    for i in range 10 to 1
-      print i
-    print 'wie niet weg is is gezien'""")
-    expected = textwrap.dedent("""\
-    step = 1 if int(10) < int(1) else -1
-    for i in range(int(10), int(1) + step, step):
-      print(str(i))
-    print('wie niet weg is is gezien')""")
+    dieren is hond, kat, papegaai
+    for dier in dieren
+      print dier""")
 
     result = hedy.transpile(code, self.level)
 
-    self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
-
-
-  def test_if_under_else_in_for(self):
-    code = textwrap.dedent("""\
-    for i in range 0 to 10
-      antwoord is ask 'Wat is 5*5'
-      if antwoord is 24
-        print 'Dat is fout!'
-      else
-        print 'Dat is goed!'
-      if antwoord is 25
-        i is 10""")
-
     expected = textwrap.dedent("""\
-    step = 1 if int(0) < int(10) else -1
-    for i in range(int(0), int(10) + step, step):
-      antwoord = input('Wat is 5*5')
-      if str(antwoord) == str('24'):
-        print('Dat is fout!')
-      else:
-        print('Dat is goed!')
-      if str(antwoord) == str('25'):
-        i = '10'""")
-
-    result = hedy.transpile(code, self.level)
+    dieren = ['hond', 'kat', 'papegaai']
+    for dier in dieren:
+      print(str(dier))""")
 
     self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
-
-    #fails, issue 363
 
-  def test_for_ifbug(self):
+  def test_for_list_multiple_lines(self):
     code = textwrap.dedent("""\
-    for i in range 0 to 10
-      antwoord is ask 'Wat is 5*5'
-      if antwoord is 24
-        print 'fout'
-    print 'klaar met for loop'""")
-
-    expected = textwrap.dedent("""\
-      step = 1 if int(0) < int(10) else -1
-      for i in range(int(0), int(10) + step, step):
-        antwoord = input('Wat is 5*5')
-        if str(antwoord) == str('24'):
-          print('fout')
-      print('klaar met for loop')""")
+    familie is baby, mommy, daddy, grandpa, grandma
+    for shark in familie
+      print shark ' shark tudutudutudu'
+      print shark ' shark tudutudutudu'
+      print shark ' shark tudutudutudu'
+      print shark ' shark'""")
 
     result = hedy.transpile(code, self.level)
 
-    self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
-
-  def test_for_loopbug599(self):
-    code = textwrap.dedent("""\
-    for i in range 0 to 10
-      if i is 2
-        print '2'""")
-
     expected = textwrap.dedent("""\
-      step = 1 if int(0) < int(10) else -1
-      for i in range(int(0), int(10) + step, step):
-        if str(i) == str('2'):
-          print('2')""")
-
-    result = hedy.transpile(code, self.level)
+    familie = ['baby', 'mommy', 'daddy', 'grandpa', 'grandma']
+    for shark in familie:
+      print(str(shark)+' shark tudutudutudu')
+      print(str(shark)+' shark tudutudutudu')
+      print(str(shark)+' shark tudutudutudu')
+      print(str(shark)+' shark')""")
 
     self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
-
-
-#programs with issues to see if we catch them properly
-# (so this should fail, for now)
-# at one point we want a real "Indent" error and a better error message
-# for this!
-
-  # def test_level_7_no_indentation(self):
-  #   #test that we get a parse error here
-  #   code = textwrap.dedent("""\
-  #   antwoord is ask Hoeveel is 10 keer tien?
-  #   if antwoord is 100
-  #   print 'goed zo'
-  #   else
-  #   print 'bah slecht'""")
-  #
-  #   with self.assertRaises(Exception) as context:
-  #     result = hedy.transpile(code, self.level)
-  #   self.assertEqual(str(context.exception), 'Parse')
-
 
diff --git a/tests/tests_level_09.py b/tests/tests_level_09.py
--- a/tests/tests_level_09.py
+++ b/tests/tests_level_09.py
@@ -50,7 +50,7 @@ def test_ask(self):
   def test_if_with_indent(self):
     code = textwrap.dedent("""\
     naam is Hedy
-    if naam is Hedy:
+    if naam is Hedy
         print 'koekoek'""")
     expected = textwrap.dedent("""\
     naam = 'Hedy'
@@ -64,10 +64,10 @@ def test_if_with_indent(self):
   def test_if_else(self):
     code = textwrap.dedent("""\
     antwoord is ask 'Hoeveel is 10 plus 10?'
-    if antwoord is 20:
+    if antwoord is 20
         print 'Goedzo!'
         print 'Het antwoord was inderdaad ' antwoord
-    else:
+    else
         print 'Foutje'
         print 'Het antwoord moest zijn ' antwoord""")
 
@@ -103,7 +103,7 @@ def test_for_loop(self):
     code = textwrap.dedent("""\
     a is 2
     a is 3
-    for a in range 2 to 4:
+    for a in range 2 to 4
       a is a + 2
       b is b + 2""")
     expected = textwrap.dedent("""\
@@ -122,9 +122,9 @@ def test_for_loop(self):
   def test_if__else(self):
     code = textwrap.dedent("""\
     a is 5
-    if a is 1:
+    if a is 1
       x is 2
-    else:
+    else
       x is 222""")
     expected = textwrap.dedent("""\
     a = '5'
@@ -140,7 +140,7 @@ def test_if__else(self):
 
   def test_forloop(self):
     code = textwrap.dedent("""\
-    for i in range 1 to 10:
+    for i in range 1 to 10
       print i
     print 'wie niet weg is is gezien'""")
     expected = textwrap.dedent("""\
@@ -154,60 +154,33 @@ def test_forloop(self):
     self.assertEqual(expected, result.code)
     self.assertEqual(False, result.has_turtle)
 
-  def test_allow_space_after_else_line(self):
 
+  def test_reverse_range(self):
     code = textwrap.dedent("""\
-    if a is 1:
-      print a
-    else:   
-      print 'nee'""")
-
+    for i in range 10 to 1
+      print i
+    print 'wie niet weg is is gezien'""")
     expected = textwrap.dedent("""\
-    if str('a') == str('1'):
-      print('a')
-    else:
-      print('nee')""")
-
-    self.multi_level_tester(
-      max_level=10,
-      code=code,
-      expected=expected,
-      test_name=self.test_name()
-    )
-
-
-  def test_allow_space_before_colon(self):
-    max_level=10
-
-    code = textwrap.dedent("""\
-    if a is 1  :
-      print a
-    else:   
-      print 'nee'""")
+    step = 1 if int(10) < int(1) else -1
+    for i in range(int(10), int(1) + step, step):
+      print(str(i))
+    print('wie niet weg is is gezien')""")
 
-    expected = textwrap.dedent("""\
-    if str('a') == str('1'):
-      print('a')
-    else:
-      print('nee')""")
+    result = hedy.transpile(code, self.level)
 
-    self.multi_level_tester(
-      max_level=10,
-      code=code,
-      expected=expected,
-      test_name=self.test_name()
-    )
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
 
 
   def test_if_under_else_in_for(self):
     code = textwrap.dedent("""\
-    for i in range 0 to 10:
+    for i in range 0 to 10
       antwoord is ask 'Wat is 5*5'
-      if antwoord is 24:
+      if antwoord is 24
         print 'Dat is fout!'
-      else:
+      else
         print 'Dat is goed!'
-      if antwoord is 25:
+      if antwoord is 25
         i is 10""")
 
     expected = textwrap.dedent("""\
@@ -226,47 +199,46 @@ def test_if_under_else_in_for(self):
     self.assertEqual(expected, result.code)
     self.assertEqual(False, result.has_turtle)
 
-  def test_if_elif(self):
-      code = textwrap.dedent("""\
-      a is 5
-      if a is 1:
-        x is 2
-      elif a is 2:
-        x is 222""")
-      expected = textwrap.dedent("""\
-      a = '5'
-      if str(a) == str('1'):
-        x = '2'
-      elif str(a) == str('2'):
-        x = '222'""")
-
-      result = hedy.transpile(code, self.level)
-
-      self.assertEqual(expected, result.code)
-      self.assertEqual(False, result.has_turtle)
-
-  def test_if_with_multiple_elifs(self):
-      code = textwrap.dedent("""\
-      a is 5
-      if a is 1:
-        x is 2
-      elif a is 4:
-        x is 3
-      elif a is 2:
-        x is 222""")
-      expected = textwrap.dedent("""\
-      a = '5'
-      if str(a) == str('1'):
-        x = '2'
-      elif str(a) == str('4'):
-        x = '3'
-      elif str(a) == str('2'):
-        x = '222'""")
-
-      result = hedy.transpile(code, self.level)
-
-      self.assertEqual(expected, result.code)
-      self.assertEqual(False, result.has_turtle)
+    #fails, issue 363
+
+  def test_for_ifbug(self):
+    code = textwrap.dedent("""\
+    for i in range 0 to 10
+      antwoord is ask 'Wat is 5*5'
+      if antwoord is 24
+        print 'fout'
+    print 'klaar met for loop'""")
+
+    expected = textwrap.dedent("""\
+      step = 1 if int(0) < int(10) else -1
+      for i in range(int(0), int(10) + step, step):
+        antwoord = input('Wat is 5*5')
+        if str(antwoord) == str('24'):
+          print('fout')
+      print('klaar met for loop')""")
+
+    result = hedy.transpile(code, self.level)
+
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
+
+  def test_for_loopbug599(self):
+    code = textwrap.dedent("""\
+    for i in range 0 to 10
+      if i is 2
+        print '2'""")
+
+    expected = textwrap.dedent("""\
+      step = 1 if int(0) < int(10) else -1
+      for i in range(int(0), int(10) + step, step):
+        if str(i) == str('2'):
+          print('2')""")
+
+    result = hedy.transpile(code, self.level)
+
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
+
 
 #programs with issues to see if we catch them properly
 # (so this should fail, for now)
diff --git a/tests/tests_level_10.py b/tests/tests_level_10.py
--- a/tests/tests_level_10.py
+++ b/tests/tests_level_10.py
@@ -56,7 +56,6 @@ def test_if_with_indent(self):
     naam = 'Hedy'
     if str(naam) == str('Hedy'):
       print('koekoek')""")
-
     result = hedy.transpile(code, self.level)
 
     self.assertEqual(expected, result.code)
@@ -95,7 +94,6 @@ def test_print_random(self):
     keuzes = ['steen', 'schaar', 'papier']
     computerkeuze=random.choice(keuzes)
     print('computer koos '+str(computerkeuze))""")
-
     result = hedy.transpile(code, self.level)
 
     self.assertEqual(expected, result.code)
@@ -121,8 +119,6 @@ def test_for_loop(self):
     self.assertEqual(expected, result.code)
     self.assertEqual(False, result.has_turtle)
 
-
-
   def test_if__else(self):
     code = textwrap.dedent("""\
     a is 5
@@ -152,46 +148,56 @@ def test_forloop(self):
     for i in range(int(1), int(10) + step, step):
       print(str(i))
     print('wie niet weg is is gezien')""")
+
     result = hedy.transpile(code, self.level)
 
     self.assertEqual(expected, result.code)
     self.assertEqual(False, result.has_turtle)
 
-  def test_for_nesting(self):
+  def test_allow_space_after_else_line(self):
+
     code = textwrap.dedent("""\
-    for i in range 1 to 3:
-      for j in range 1 to 4:
-        print 'rondje: ' i ' tel: ' j""")
+    if a is 1:
+      print a
+    else:   
+      print 'nee'""")
+
     expected = textwrap.dedent("""\
-    step = 1 if int(1) < int(3) else -1
-    for i in range(int(1), int(3) + step, step):
-      step = 1 if int(1) < int(4) else -1
-      for j in range(int(1), int(4) + step, step):
-        print('rondje: '+str(i)+' tel: '+str(j))""")
+    if str('a') == str('1'):
+      print('a')
+    else:
+      print('nee')""")
 
-    result = hedy.transpile(code, self.level)
+    self.multi_level_tester(
+      max_level=10,
+      code=code,
+      expected=expected,
+      test_name=self.name()
+    )
 
-    self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
 
-  def test_if_nesting(self):
+  def test_allow_space_before_colon(self):
+    max_level=10
+
     code = textwrap.dedent("""\
-    kleur is blauw
-    kleurtwee is geel
-    if kleur is blauw:
-      if kleurtwee is geel:
-        print 'Samen is dit groen!'""")
+    if a is 1  :
+      print a
+    else:   
+      print 'nee'""")
+
     expected = textwrap.dedent("""\
-    kleur = 'blauw'
-    kleurtwee = 'geel'
-    if str(kleur) == str('blauw'):
-      if str(kleurtwee) == str('geel'):
-        print('Samen is dit groen!')""")
+    if str('a') == str('1'):
+      print('a')
+    else:
+      print('nee')""")
 
-    result = hedy.transpile(code, self.level)
+    self.multi_level_tester(
+      max_level=10,
+      code=code,
+      expected=expected,
+      test_name=self.name()
+    )
 
-    self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
 
   def test_if_under_else_in_for(self):
     code = textwrap.dedent("""\
@@ -219,6 +225,49 @@ def test_if_under_else_in_for(self):
 
     self.assertEqual(expected, result.code)
     self.assertEqual(False, result.has_turtle)
+
+  def test_if_elif(self):
+      code = textwrap.dedent("""\
+      a is 5
+      if a is 1:
+        x is 2
+      elif a is 2:
+        x is 222""")
+      expected = textwrap.dedent("""\
+      a = '5'
+      if str(a) == str('1'):
+        x = '2'
+      elif str(a) == str('2'):
+        x = '222'""")
+
+      result = hedy.transpile(code, self.level)
+
+      self.assertEqual(expected, result.code)
+      self.assertEqual(False, result.has_turtle)
+
+  def test_if_with_multiple_elifs(self):
+      code = textwrap.dedent("""\
+      a is 5
+      if a is 1:
+        x is 2
+      elif a is 4:
+        x is 3
+      elif a is 2:
+        x is 222""")
+      expected = textwrap.dedent("""\
+      a = '5'
+      if str(a) == str('1'):
+        x = '2'
+      elif str(a) == str('4'):
+        x = '3'
+      elif str(a) == str('2'):
+        x = '222'""")
+
+      result = hedy.transpile(code, self.level)
+
+      self.assertEqual(expected, result.code)
+      self.assertEqual(False, result.has_turtle)
+
 #programs with issues to see if we catch them properly
 # (so this should fail, for now)
 # at one point we want a real "Indent" error and a better error message
diff --git a/tests/tests_level_11.py b/tests/tests_level_11.py
--- a/tests/tests_level_11.py
+++ b/tests/tests_level_11.py
@@ -6,22 +6,22 @@ class TestsLevel11(HedyTester):
   level = 11
   
   def test_print(self):
-    result = hedy.transpile("print('ik heet')", self.level)
+    result = hedy.transpile("print 'ik heet'", self.level)
     expected = "print('ik heet')"
     self.assertEqual(expected, result.code)
     self.assertEqual(False, result.has_turtle)
 
-  def test_print_with_var(self):
-    code = "naam is Hedy\nprint('ik heet' naam)"
-    expected = "naam = 'Hedy'\nprint('ik heet'+str(naam))"
-
-    self.multi_level_tester(
-      max_level=18,
-      code=code,
-      expected=expected,
-      extra_check_function=self.is_not_turtle(),
-      test_name=self.test_name()
-    )
+  # def test_print_with_var(self):
+  #   code = "naam is Hedy\nprint('ik heet' naam)"
+  #   expected = "naam = 'Hedy'\nprint('ik heet'+str(naam))"
+  #
+  #   self.multi_level_tester(
+  #     max_level=18,
+  #     code=code,
+  #     expected=expected,
+  #     extra_check_function=self.is_not_turtle(),
+  #     test_name=self.name()
+  #   )
   def test_assign_print(self):
     #todo can be merged with 2 to 4 when we have f strings everywhere
     code = textwrap.dedent("""\
@@ -37,11 +37,11 @@ def test_assign_print(self):
       code=code,
       expected=expected,
       extra_check_function=self.is_not_turtle(),
-      test_name=self.test_name()
+      test_name=self.name()
     )
 
   def test_print_with_calc_no_spaces(self):
-    result = hedy.transpile("print('5 keer 5 is ' 5*5)", self.level)
+    result = hedy.transpile("print '5 keer 5 is ' 5*5", self.level)
     expected = "print('5 keer 5 is '+str(int(5) * int(5)))"
     self.assertEqual(expected, result.code)
     self.assertEqual(False, result.has_turtle)
@@ -50,7 +50,7 @@ def test_print_calculation_times_directly(self):
     code = textwrap.dedent("""\
     nummer is 5
     nummertwee is 6
-    print(nummer * nummertwee)""")
+    print nummer * nummertwee""")
 
     result = hedy.transpile(code, self.level)
 
@@ -65,7 +65,7 @@ def test_print_calculation_times_directly(self):
     self.assertEqual("30", self.run_code(result))
 
   def test_ask(self):
-    result = hedy.transpile("antwoord is input('wat is je lievelingskleur?')", self.level)
+    result = hedy.transpile("antwoord is ask 'wat is je lievelingskleur?'", self.level)
     expected = "antwoord = input('wat is je lievelingskleur?')"
     self.assertEqual(expected, result.code)
     self.assertEqual(False, result.has_turtle)
@@ -74,7 +74,7 @@ def test_if_with_indent(self):
     code = textwrap.dedent("""\
     naam is Hedy
     if naam is Hedy:
-        print('koekoek')""")
+        print 'koekoek'""")
     expected = textwrap.dedent("""\
     naam = 'Hedy'
     if str(naam) == str('Hedy'):
@@ -87,13 +87,13 @@ def test_if_with_indent(self):
 
   def test_if_else(self):
     code = textwrap.dedent("""\
-    antwoord is input('Hoeveel is 10 plus 10?')
+    antwoord is ask 'Hoeveel is 10 plus 10?'
     if antwoord is 20:
-        print('Goedzo!')
-        print('Het antwoord was inderdaad ' antwoord)
+        print 'Goedzo!'
+        print 'Het antwoord was inderdaad ' antwoord
     else:
-        print('Foutje')
-        print('Het antwoord moest zijn ' antwoord)""")
+        print 'Foutje'
+        print 'Het antwoord moest zijn ' antwoord""")
 
     expected = textwrap.dedent("""\
     antwoord = input('Hoeveel is 10 plus 10?')
@@ -113,7 +113,7 @@ def test_print_random(self):
     code = textwrap.dedent("""\
     keuzes is steen, schaar, papier
     computerkeuze is keuzes at random
-    print('computer koos ' computerkeuze)""")
+    print 'computer koos ' computerkeuze""")
     expected = textwrap.dedent("""\
     keuzes = ['steen', 'schaar', 'papier']
     computerkeuze=random.choice(keuzes)
@@ -128,7 +128,7 @@ def test_for_loop(self):
     code = textwrap.dedent("""\
     a is 2
     a is 3
-    for a in range(2,4):
+    for a in range 2 to 4:
       a is a + 2
       b is b + 2""")
     expected = textwrap.dedent("""\
@@ -144,6 +144,8 @@ def test_for_loop(self):
     self.assertEqual(expected, result.code)
     self.assertEqual(False, result.has_turtle)
 
+
+
   def test_if__else(self):
     code = textwrap.dedent("""\
     a is 5
@@ -157,62 +159,22 @@ def test_if__else(self):
       x = '2'
     else:
       x = '222'""")
+
     result = hedy.transpile(code, self.level)
 
     self.assertEqual(expected, result.code)
     self.assertEqual(False, result.has_turtle)
 
-  def test_allow_space_after_else_line(self):
-    code = textwrap.dedent("""\
-    if a is 1:
-      print(a)
-    else:   
-      print('nee')""")
-
-    expected = textwrap.dedent("""\
-    if str(a) == str('1'):
-      print(str(a))
-    else:
-      print('nee')""")
-
-    self.multi_level_tester(
-      code=code,
-      max_level=19,
-      expected=expected,
-      test_name=self.test_name()
-    )
-
-  def test_allow_space_before_colon(self):
-    code = textwrap.dedent("""\
-    if a is 1  :
-      print(a)
-    else:   
-      print('nee')""")
-
-    expected = textwrap.dedent("""\
-    if str(a) == str('1'):
-      print(str(a))
-    else:
-      print('nee')""")
-
-    self.multi_level_tester(
-      code=code,
-      max_level=19,
-      expected=expected,
-      test_name=self.test_name()
-    )
-
   def test_forloop(self):
     code = textwrap.dedent("""\
-    for i in range(1, 10):
-      print(i)
-    print('wie niet weg is is gezien')""")
+    for i in range 1 to 10:
+      print i
+    print 'wie niet weg is is gezien'""")
     expected = textwrap.dedent("""\
     step = 1 if int(1) < int(10) else -1
     for i in range(int(1), int(10) + step, step):
       print(str(i))
     print('wie niet weg is is gezien')""")
-
     result = hedy.transpile(code, self.level)
 
     self.assertEqual(expected, result.code)
@@ -220,9 +182,9 @@ def test_forloop(self):
 
   def test_for_nesting(self):
     code = textwrap.dedent("""\
-    for i in range(1, 3):
-      for j in range(1,4):
-        print('rondje: ' i ' tel: ' j)""")
+    for i in range 1 to 3:
+      for j in range 1 to 4:
+        print 'rondje: ' i ' tel: ' j""")
     expected = textwrap.dedent("""\
     step = 1 if int(1) < int(3) else -1
     for i in range(int(1), int(3) + step, step):
@@ -241,7 +203,7 @@ def test_if_nesting(self):
     kleurtwee is geel
     if kleur is blauw:
       if kleurtwee is geel:
-        print('Samen is dit groen!')""")
+        print 'Samen is dit groen!'""")
     expected = textwrap.dedent("""\
     kleur = 'blauw'
     kleurtwee = 'geel'
@@ -254,32 +216,14 @@ def test_if_nesting(self):
     self.assertEqual(expected, result.code)
     self.assertEqual(False, result.has_turtle)
 
-  def test_newprint(self):
-    code = textwrap.dedent("""\
-    leeftijd is input('Hoe oud ben jij?')
-    print('Dus jij hebt zo veel verjaardagen gehad:')
-    for i in range(0,leeftijd):
-        print(i)""")
-    expected = textwrap.dedent("""\
-    leeftijd = input('Hoe oud ben jij?')
-    print('Dus jij hebt zo veel verjaardagen gehad:')
-    step = 1 if int(0) < int(leeftijd) else -1
-    for i in range(int(0), int(leeftijd) + step, step):
-      print(str(i))""")
-
-    result = hedy.transpile(code, self.level)
-
-    self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
-
   def test_if_under_else_in_for(self):
     code = textwrap.dedent("""\
-    for i in range(0, 10):
-      antwoord is input('Wat is 5*5')
+    for i in range 0 to 10:
+      antwoord is ask 'Wat is 5*5'
       if antwoord is 24:
-        print('Dat is fout!')
+        print 'Dat is fout!'
       else:
-        print('Dat is goed!')
+        print 'Dat is goed!'
       if antwoord is 25:
         i is 10""")
 
@@ -298,7 +242,6 @@ def test_if_under_else_in_for(self):
 
     self.assertEqual(expected, result.code)
     self.assertEqual(False, result.has_turtle)
-
 #programs with issues to see if we catch them properly
 # (so this should fail, for now)
 # at one point we want a real "Indent" error and a better error message
@@ -314,47 +257,7 @@ def test_if_under_else_in_for(self):
   #   print 'bah slecht'""")
   #
   #   with self.assertRaises(Exception) as context:
-  #     result = hedy.transpile(code, 10)
+  #     result = hedy.transpile(code, self.level)
   #   self.assertEqual(str(context.exception), 'Parse')
 
-  def test_multiple_spaces_after_print(self):
-    code = "print    ('hallo!')"
-
-    expected = textwrap.dedent("""\
-    print('hallo!')""")
-
-    self.multi_level_tester(
-      code=code,
-      max_level=22,
-      expected=expected,
-      test_name=self.test_name(),
-      extra_check_function=self.is_not_turtle()
-    )
-
-  def test_two_spaces_after_bracket(self):
-    code = "print(   'hallo!')"
 
-    expected = textwrap.dedent("""\
-    print('hallo!')""")
-
-    self.multi_level_tester(
-      code=code,
-      max_level=22,
-      expected=expected,
-      test_name=self.test_name(),
-      extra_check_function=self.is_not_turtle()
-    )
-
-  def test_multiple_spaces_before_and_after_bracket(self):
-    code = "print  (   'hallo!')"
-
-    expected = textwrap.dedent("""\
-    print('hallo!')""")
-
-    self.multi_level_tester(
-      code=code,
-      max_level=22,
-      expected=expected,
-      test_name=self.test_name(),
-      extra_check_function=self.is_not_turtle()
-    )
\ No newline at end of file
diff --git a/tests/tests_level_12.py b/tests/tests_level_12.py
--- a/tests/tests_level_12.py
+++ b/tests/tests_level_12.py
@@ -4,7 +4,7 @@
 
 class TestsLevel12(HedyTester):
   level = 12
-
+  
   def test_print(self):
     result = hedy.transpile("print('ik heet')", self.level)
     expected = "print('ik heet')"
@@ -49,13 +49,13 @@ def test_ask(self):
 
   def test_if_with_indent(self):
     code = textwrap.dedent("""\
-naam is Hedy
-if naam is Hedy:
-    print('koekoek')""")
+    naam is Hedy
+    if naam is Hedy:
+        print('koekoek')""")
     expected = textwrap.dedent("""\
-naam = 'Hedy'
-if str(naam) == str('Hedy'):
-  print('koekoek')""")
+    naam = 'Hedy'
+    if str(naam) == str('Hedy'):
+      print('koekoek')""")
 
     result = hedy.transpile(code, self.level)
 
@@ -64,22 +64,22 @@ def test_if_with_indent(self):
 
   def test_if_else(self):
     code = textwrap.dedent("""\
-antwoord is input('Hoeveel is 10 plus 10?')
-if antwoord is 20:
-    print('Goedzo!')
-    print('Het antwoord was inderdaad ' antwoord)
-else:
-    print('Foutje')
-    print('Het antwoord moest zijn ' antwoord)""")
+    antwoord is input('Hoeveel is 10 plus 10?')
+    if antwoord is 20:
+        print('Goedzo!')
+        print('Het antwoord was inderdaad ' antwoord)
+    else:
+        print('Foutje')
+        print('Het antwoord moest zijn ' antwoord)""")
 
     expected = textwrap.dedent("""\
-antwoord = input('Hoeveel is 10 plus 10?')
-if str(antwoord) == str('20'):
-  print('Goedzo!')
-  print('Het antwoord was inderdaad '+str(antwoord))
-else:
-  print('Foutje')
-  print('Het antwoord moest zijn '+str(antwoord))""")
+    antwoord = input('Hoeveel is 10 plus 10?')
+    if str(antwoord) == str('20'):
+      print('Goedzo!')
+      print('Het antwoord was inderdaad '+str(antwoord))
+    else:
+      print('Foutje')
+      print('Het antwoord moest zijn '+str(antwoord))""")
 
     result = hedy.transpile(code, self.level)
 
@@ -88,8 +88,8 @@ def test_if_else(self):
 
   def test_print_random(self):
     code = textwrap.dedent("""\
-    keuzes is ['steen', 'schaar', 'papier']
-    computerkeuze is keuzes[random]
+    keuzes is steen, schaar, papier
+    computerkeuze is keuzes at random
     print('computer koos ' computerkeuze)""")
     expected = textwrap.dedent("""\
     keuzes = ['steen', 'schaar', 'papier']
@@ -134,12 +134,51 @@ def test_if__else(self):
       x = '2'
     else:
       x = '222'""")
-
     result = hedy.transpile(code, self.level)
 
     self.assertEqual(expected, result.code)
     self.assertEqual(False, result.has_turtle)
 
+  def test_allow_space_after_else_line(self):
+    code = textwrap.dedent("""\
+    if a is 1:
+      print(a)
+    else:   
+      print('nee')""")
+
+    expected = textwrap.dedent("""\
+    if str(a) == str('1'):
+      print(str(a))
+    else:
+      print('nee')""")
+
+    self.multi_level_tester(
+      code=code,
+      max_level=19,
+      expected=expected,
+      test_name=self.name()
+    )
+
+  def test_allow_space_before_colon(self):
+    code = textwrap.dedent("""\
+    if a is 1  :
+      print(a)
+    else:   
+      print('nee')""")
+
+    expected = textwrap.dedent("""\
+    if str(a) == str('1'):
+      print(str(a))
+    else:
+      print('nee')""")
+
+    self.multi_level_tester(
+      code=code,
+      max_level=19,
+      expected=expected,
+      test_name=self.name()
+    )
+
   def test_forloop(self):
     code = textwrap.dedent("""\
     for i in range(1, 10):
@@ -210,96 +249,6 @@ def test_newprint(self):
     self.assertEqual(expected, result.code)
     self.assertEqual(False, result.has_turtle)
 
-  def test_list(self):
-    code = textwrap.dedent("""\
-    fruit is ['appel', 'banaan', 'kers']
-    print(fruit)""")
-    expected = textwrap.dedent("""\
-    fruit = ['appel', 'banaan', 'kers']
-    print(str(fruit))""")
-
-    result = hedy.transpile(code, self.level)
-
-    self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
-
-  def test_random(self):
-    code = textwrap.dedent("""\
-    dieren is ['Hond', 'Kat', 'Kangoeroe']
-    print(dieren[random])""")
-
-    expected = textwrap.dedent("""\
-    dieren = ['Hond', 'Kat', 'Kangoeroe']
-    print(str(random.choice(dieren)))""")
-
-    # check if result is in the expected list
-    check_in_list = (lambda x: self.run_code(x) in ['Hond', 'Kat', 'Kangoeroe'])
-
-    self.multi_level_tester(
-      max_level=19,
-      code=code,
-      expected=expected,
-      test_name=self.test_name(),
-      extra_check_function=check_in_list
-    )
-
-
-
-  def test_list_multiple_spaces(self):
-    code = textwrap.dedent("""\
-    fruit is ['appel',  'banaan',    'kers']
-    print(fruit)""")
-    expected = textwrap.dedent("""\
-    fruit = ['appel', 'banaan', 'kers']
-    print(str(fruit))""")
-
-    result = hedy.transpile(code, self.level)
-
-    self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
-
-  def test_specific_access(self):
-    code = textwrap.dedent("""\
-    fruit is ['banaan', 'appel', 'kers']
-    eerstefruit is fruit[1]
-    print(eerstefruit)""")
-    expected = textwrap.dedent("""\
-    fruit = ['banaan', 'appel', 'kers']
-    eerstefruit=fruit[1-1]
-    print(str(eerstefruit))""")
-
-    result = hedy.transpile(code, self.level)
-
-    self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
-
-#note that print(str(highscore)) will not print as it will compare 'score[i]' as str to a variable
-  def test_everything_combined(self):
-    code = textwrap.dedent("""\
-    score is ['100', '300', '500']
-    highscore is score[random]
-    print('De highscore is: ' highscore)
-    for i in range(1,3):
-        scorenu is score[i]
-        print('Score is nu ' scorenu)
-        if highscore is score[i]:
-            print(highscore)""")
-    expected = textwrap.dedent("""\
-    score = ['100', '300', '500']
-    highscore=random.choice(score)
-    print('De highscore is: '+str(highscore))
-    step = 1 if int(1) < int(3) else -1
-    for i in range(int(1), int(3) + step, step):
-      scorenu=score[i-1]
-      print('Score is nu '+str(scorenu))
-      if str(highscore) == str('score[i]'):
-        print(str(highscore))""")
-
-    result = hedy.transpile(code, self.level)
-
-    self.assertEqual(expected, result.code)
-    self.assertEqual(False, result.has_turtle)
-
   def test_if_under_else_in_for(self):
     code = textwrap.dedent("""\
     for i in range(0, 10):
@@ -345,4 +294,44 @@ def test_if_under_else_in_for(self):
   #     result = hedy.transpile(code, 10)
   #   self.assertEqual(str(context.exception), 'Parse')
 
+  def test_multiple_spaces_after_print(self):
+    code = "print    ('hallo!')"
+
+    expected = textwrap.dedent("""\
+    print('hallo!')""")
+
+    self.multi_level_tester(
+      code=code,
+      max_level=22,
+      expected=expected,
+      test_name=self.name(),
+      extra_check_function=self.is_not_turtle()
+    )
+
+  def test_two_spaces_after_bracket(self):
+    code = "print(   'hallo!')"
+
+    expected = textwrap.dedent("""\
+    print('hallo!')""")
+
+    self.multi_level_tester(
+      code=code,
+      max_level=22,
+      expected=expected,
+      test_name=self.name(),
+      extra_check_function=self.is_not_turtle()
+    )
 
+  def test_multiple_spaces_before_and_after_bracket(self):
+    code = "print  (   'hallo!')"
+
+    expected = textwrap.dedent("""\
+    print('hallo!')""")
+
+    self.multi_level_tester(
+      code=code,
+      max_level=22,
+      expected=expected,
+      test_name=self.name(),
+      extra_check_function=self.is_not_turtle()
+    )
\ No newline at end of file
diff --git a/tests/tests_level_13.py b/tests/tests_level_13.py
--- a/tests/tests_level_13.py
+++ b/tests/tests_level_13.py
@@ -3,66 +3,67 @@
 from tests_level_01 import HedyTester
 
 class TestsLevel13(HedyTester):
-    level = 13
-
-    def test_print(self):
-        result = hedy.transpile("print('ik heet')", self.level)
-        expected = "print('ik heet')"
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_print_with_var(self):
-        result = hedy.transpile("naam is Hedy\nprint('ik heet' naam)", self.level)
-        expected = "naam = 'Hedy'\nprint('ik heet'+str(naam))"
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_print_with_calc_no_spaces(self):
-        result = hedy.transpile("print('5 keer 5 is ' 5*5)", self.level)
-        expected = "print('5 keer 5 is '+str(int(5) * int(5)))"
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-
-    def test_print_calculation_times_directly(self):
-        code = textwrap.dedent("""\
+  level = 13
+
+  def test_print(self):
+    result = hedy.transpile("print('ik heet')", self.level)
+    expected = "print('ik heet')"
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
+
+  def test_print_with_var(self):
+    result = hedy.transpile("naam is Hedy\nprint('ik heet' naam)", self.level)
+    expected = "naam = 'Hedy'\nprint('ik heet'+str(naam))"
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
+
+  def test_print_with_calc_no_spaces(self):
+    result = hedy.transpile("print('5 keer 5 is ' 5*5)", self.level)
+    expected = "print('5 keer 5 is '+str(int(5) * int(5)))"
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
+
+  def test_print_calculation_times_directly(self):
+    code = textwrap.dedent("""\
     nummer is 5
     nummertwee is 6
     print(nummer * nummertwee)""")
 
-        result = hedy.transpile(code, self.level)
+    result = hedy.transpile(code, self.level)
 
-        expected = textwrap.dedent("""\
+    expected = textwrap.dedent("""\
     nummer = '5'
     nummertwee = '6'
     print(str(int(nummer) * int(nummertwee)))""")
 
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-        self.assertEqual("30", self.run_code(result))
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
+
+    self.assertEqual("30", self.run_code(result))
 
-    def test_ask(self):
-        result = hedy.transpile("antwoord is input('wat is je lievelingskleur?')", self.level)
-        expected = "antwoord = input('wat is je lievelingskleur?')"
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
+  def test_ask(self):
+    result = hedy.transpile("antwoord is input('wat is je lievelingskleur?')", self.level)
+    expected = "antwoord = input('wat is je lievelingskleur?')"
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
 
-    def test_if_with_indent(self):
-        code = textwrap.dedent("""\
+  def test_if_with_indent(self):
+    code = textwrap.dedent("""\
 naam is Hedy
 if naam is Hedy:
     print('koekoek')""")
-        expected = textwrap.dedent("""\
+    expected = textwrap.dedent("""\
 naam = 'Hedy'
 if str(naam) == str('Hedy'):
   print('koekoek')""")
 
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
+    result = hedy.transpile(code, self.level)
 
-    def test_if_else(self):
-        code = textwrap.dedent("""\
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
+
+  def test_if_else(self):
+    code = textwrap.dedent("""\
 antwoord is input('Hoeveel is 10 plus 10?')
 if antwoord is 20:
     print('Goedzo!')
@@ -71,7 +72,7 @@ def test_if_else(self):
     print('Foutje')
     print('Het antwoord moest zijn ' antwoord)""")
 
-        expected = textwrap.dedent("""\
+    expected = textwrap.dedent("""\
 antwoord = input('Hoeveel is 10 plus 10?')
 if str(antwoord) == str('20'):
   print('Goedzo!')
@@ -80,32 +81,34 @@ def test_if_else(self):
   print('Foutje')
   print('Het antwoord moest zijn '+str(antwoord))""")
 
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
+    result = hedy.transpile(code, self.level)
+
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
 
-    def test_print_random(self):
-        code = textwrap.dedent("""\
+  def test_print_random(self):
+    code = textwrap.dedent("""\
     keuzes is ['steen', 'schaar', 'papier']
     computerkeuze is keuzes[random]
     print('computer koos ' computerkeuze)""")
-        expected = textwrap.dedent("""\
+    expected = textwrap.dedent("""\
     keuzes = ['steen', 'schaar', 'papier']
     computerkeuze=random.choice(keuzes)
     print('computer koos '+str(computerkeuze))""")
 
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
+    result = hedy.transpile(code, self.level)
 
-    def test_for_loop(self):
-        code = textwrap.dedent("""\
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
+
+  def test_for_loop(self):
+    code = textwrap.dedent("""\
     a is 2
     a is 3
     for a in range(2,4):
       a is a + 2
       b is b + 2""")
-        expected = textwrap.dedent("""\
+    expected = textwrap.dedent("""\
     a = '2'
     a = '3'
     step = 1 if int(2) < int(4) else -1
@@ -113,137 +116,166 @@ def test_for_loop(self):
       a = int(a) + int(2)
       b = int(b) + int(2)""")
 
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
+    result = hedy.transpile(code, self.level)
+
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
 
-    def test_if__else(self):
-        code = textwrap.dedent("""\
+  def test_if__else(self):
+    code = textwrap.dedent("""\
     a is 5
     if a is 1:
       x is 2
     else:
       x is 222""")
-        expected = textwrap.dedent("""\
+    expected = textwrap.dedent("""\
     a = '5'
     if str(a) == str('1'):
       x = '2'
     else:
       x = '222'""")
 
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
+    result = hedy.transpile(code, self.level)
 
-    def test_forloop(self):
-        code = textwrap.dedent("""\
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
+
+  def test_forloop(self):
+    code = textwrap.dedent("""\
     for i in range(1, 10):
       print(i)
     print('wie niet weg is is gezien')""")
-        expected = textwrap.dedent("""\
+    expected = textwrap.dedent("""\
     step = 1 if int(1) < int(10) else -1
     for i in range(int(1), int(10) + step, step):
       print(str(i))
     print('wie niet weg is is gezien')""")
 
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
+    result = hedy.transpile(code, self.level)
+
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
 
-    def test_for_nesting(self):
-        code = textwrap.dedent("""\
+  def test_for_nesting(self):
+    code = textwrap.dedent("""\
     for i in range(1, 3):
       for j in range(1,4):
         print('rondje: ' i ' tel: ' j)""")
-        expected = textwrap.dedent("""\
+    expected = textwrap.dedent("""\
     step = 1 if int(1) < int(3) else -1
     for i in range(int(1), int(3) + step, step):
       step = 1 if int(1) < int(4) else -1
       for j in range(int(1), int(4) + step, step):
         print('rondje: '+str(i)+' tel: '+str(j))""")
 
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
+    result = hedy.transpile(code, self.level)
 
-    def test_if_nesting(self):
-        code = textwrap.dedent("""\
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
+
+  def test_if_nesting(self):
+    code = textwrap.dedent("""\
     kleur is blauw
     kleurtwee is geel
     if kleur is blauw:
       if kleurtwee is geel:
         print('Samen is dit groen!')""")
-        expected = textwrap.dedent("""\
+    expected = textwrap.dedent("""\
     kleur = 'blauw'
     kleurtwee = 'geel'
     if str(kleur) == str('blauw'):
       if str(kleurtwee) == str('geel'):
         print('Samen is dit groen!')""")
 
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
+    result = hedy.transpile(code, self.level)
+
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
 
-    def test_newprint(self):
-        code = textwrap.dedent("""\
+  def test_newprint(self):
+    code = textwrap.dedent("""\
     leeftijd is input('Hoe oud ben jij?')
     print('Dus jij hebt zo veel verjaardagen gehad:')
     for i in range(0,leeftijd):
         print(i)""")
-        expected = textwrap.dedent("""\
+    expected = textwrap.dedent("""\
     leeftijd = input('Hoe oud ben jij?')
     print('Dus jij hebt zo veel verjaardagen gehad:')
     step = 1 if int(0) < int(leeftijd) else -1
     for i in range(int(0), int(leeftijd) + step, step):
       print(str(i))""")
 
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
+    result = hedy.transpile(code, self.level)
 
-    def test_list(self):
-        code = textwrap.dedent("""\
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
+
+  def test_list(self):
+    code = textwrap.dedent("""\
     fruit is ['appel', 'banaan', 'kers']
     print(fruit)""")
-        expected = textwrap.dedent("""\
+    expected = textwrap.dedent("""\
     fruit = ['appel', 'banaan', 'kers']
     print(str(fruit))""")
 
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
+    result = hedy.transpile(code, self.level)
 
-    def test_random(self):
-        code = textwrap.dedent("""\
-    fruit is ['banaan', 'appel', 'kers']
-    randomfruit is fruit[random]
-    print(randomfruit)""")
-        expected = textwrap.dedent("""\
-    fruit = ['banaan', 'appel', 'kers']
-    randomfruit=random.choice(fruit)
-    print(str(randomfruit))""")
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
+
+  def test_random(self):
+    code = textwrap.dedent("""\
+    dieren is ['Hond', 'Kat', 'Kangoeroe']
+    print(dieren[random])""")
+
+    expected = textwrap.dedent("""\
+    dieren = ['Hond', 'Kat', 'Kangoeroe']
+    print(str(random.choice(dieren)))""")
+
+    # check if result is in the expected list
+    check_in_list = (lambda x: self.run_code(x) in ['Hond', 'Kat', 'Kangoeroe'])
+
+    self.multi_level_tester(
+      max_level=19,
+      code=code,
+      expected=expected,
+      test_name=self.name(),
+      extra_check_function=check_in_list
+    )
+
+
+
+  def test_list_multiple_spaces(self):
+    code = textwrap.dedent("""\
+    fruit is ['appel',  'banaan',    'kers']
+    print(fruit)""")
+    expected = textwrap.dedent("""\
+    fruit = ['appel', 'banaan', 'kers']
+    print(str(fruit))""")
+
+    result = hedy.transpile(code, self.level)
 
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
 
-    def test_specific_access(self):
-        code = textwrap.dedent("""\
+  def test_specific_access(self):
+    code = textwrap.dedent("""\
     fruit is ['banaan', 'appel', 'kers']
     eerstefruit is fruit[1]
     print(eerstefruit)""")
-        expected = textwrap.dedent("""\
+    expected = textwrap.dedent("""\
     fruit = ['banaan', 'appel', 'kers']
     eerstefruit=fruit[1-1]
     print(str(eerstefruit))""")
 
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
+    result = hedy.transpile(code, self.level)
 
-    # note that print(str(highscore)) will not print as it will compare 'score[i]' as str to a variable
-    def test_everything_combined(self):
-        code = textwrap.dedent("""\
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
+
+#note that print(str(highscore)) will not print as it will compare 'score[i]' as str to a variable
+  def test_everything_combined(self):
+    code = textwrap.dedent("""\
     score is ['100', '300', '500']
     highscore is score[random]
     print('De highscore is: ' highscore)
@@ -252,7 +284,7 @@ def test_everything_combined(self):
         print('Score is nu ' scorenu)
         if highscore is score[i]:
             print(highscore)""")
-        expected = textwrap.dedent("""\
+    expected = textwrap.dedent("""\
     score = ['100', '300', '500']
     highscore=random.choice(score)
     print('De highscore is: '+str(highscore))
@@ -263,12 +295,13 @@ def test_everything_combined(self):
       if str(highscore) == str('score[i]'):
         print(str(highscore))""")
 
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
+    result = hedy.transpile(code, self.level)
+
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
 
-    def test_if_under_else_in_for(self):
-        code = textwrap.dedent("""\
+  def test_if_under_else_in_for(self):
+    code = textwrap.dedent("""\
     for i in range(0, 10):
       antwoord is input('Wat is 5*5')
       if antwoord is 24:
@@ -278,7 +311,7 @@ def test_if_under_else_in_for(self):
       if antwoord is 25:
         i is 10""")
 
-        expected = textwrap.dedent("""\
+    expected = textwrap.dedent("""\
     step = 1 if int(0) < int(10) else -1
     for i in range(int(0), int(10) + step, step):
       antwoord = input('Wat is 5*5')
@@ -289,105 +322,27 @@ def test_if_under_else_in_for(self):
       if str(antwoord) == str('25'):
         i = '10'""")
 
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_bool_true(self):
-        code = textwrap.dedent("""\
-        ja is True
-        if ja is True:
-            print('ja')""")
-        expected = textwrap.dedent("""\
-        ja = True
-        if ja == True:
-          print('ja')""")
-
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_bool_false(self):
-        code = textwrap.dedent("""\
-    ja is False
-    if ja is False:
-        print('ja')""")
-        expected = textwrap.dedent("""\
-    ja = False
-    if ja == False:
-      print('ja')""")
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_bool_true2(self):
-        code = textwrap.dedent("""\
-    ja is true
-    if ja is True:
-        print('ja')""")
-        expected = textwrap.dedent("""\
-    ja = True
-    if ja == True:
-      print('ja')""")
-
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_bool_false2(self):
-        code = textwrap.dedent("""\
-    ja is false
-    if ja is False:
-        print('ja')""")
-        expected = textwrap.dedent("""\
-    ja = False
-    if ja == False:
-      print('ja')""")
-
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_bool_total(self):
-        code = textwrap.dedent("""\
-    jebenternog is False
-    benjeernog is input('ben je er nog? ja of nee?')
-    if benjeernog is ja:
-        jebenternog is True
-    if jebenternog is True:
-        print('Hallo!')
-    if jebenternog is False:
-        print('Doei!')""")
-        expected = textwrap.dedent("""\
-    jebenternog = False
-    benjeernog = input('ben je er nog? ja of nee?')
-    if str(benjeernog) == str('ja'):
-      jebenternog = True
-    if jebenternog == True:
-      print('Hallo!')
-    if jebenternog == False:
-      print('Doei!')""")
-
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-# programs with issues to see if we catch them properly
+    result = hedy.transpile(code, self.level)
+
+    self.assertEqual(expected, result.code)
+    self.assertEqual(False, result.has_turtle)
+
+#programs with issues to see if we catch them properly
 # (so this should fail, for now)
 # at one point we want a real "Indent" error and a better error message
 # for this!
 
-# def test_level_7_no_indentation(self):
-#   #test that we get a parse error here
-#   code = textwrap.dedent("""\
-#   antwoord is ask Hoeveel is 10 keer tien?
-#   if antwoord is 100
-#   print 'goed zo'
-#   else
-#   print 'bah slecht'""")
-#
-#   with self.assertRaises(Exception) as context:
-#     result = hedy.transpile(code, 10)
-#   self.assertEqual(str(context.exception), 'Parse')
+  # def test_level_7_no_indentation(self):
+  #   #test that we get a parse error here
+  #   code = textwrap.dedent("""\
+  #   antwoord is ask Hoeveel is 10 keer tien?
+  #   if antwoord is 100
+  #   print 'goed zo'
+  #   else
+  #   print 'bah slecht'""")
+  #
+  #   with self.assertRaises(Exception) as context:
+  #     result = hedy.transpile(code, 10)
+  #   self.assertEqual(str(context.exception), 'Parse')
 
 
diff --git a/tests/tests_level_14.py b/tests/tests_level_14.py
--- a/tests/tests_level_14.py
+++ b/tests/tests_level_14.py
@@ -23,11 +23,6 @@ def test_print_with_calc_no_spaces(self):
         self.assertEqual(expected, result.code)
         self.assertEqual(False, result.has_turtle)
 
-    def test_ask(self):
-        result = hedy.transpile("antwoord is input('wat is je lievelingskleur?')", self.level)
-        expected = "antwoord = input('wat is je lievelingskleur?')"
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
 
     def test_print_calculation_times_directly(self):
         code = textwrap.dedent("""\
@@ -44,9 +39,14 @@ def test_print_calculation_times_directly(self):
 
         self.assertEqual(expected, result.code)
         self.assertEqual(False, result.has_turtle)
-
         self.assertEqual("30", self.run_code(result))
 
+    def test_ask(self):
+        result = hedy.transpile("antwoord is input('wat is je lievelingskleur?')", self.level)
+        expected = "antwoord = input('wat is je lievelingskleur?')"
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
     def test_if_with_indent(self):
         code = textwrap.dedent("""\
 naam is Hedy
@@ -295,13 +295,13 @@ def test_if_under_else_in_for(self):
 
     def test_bool_true(self):
         code = textwrap.dedent("""\
-    ja is True
-    if ja is True:
-        print('ja')""")
+        ja is True
+        if ja is True:
+            print('ja')""")
         expected = textwrap.dedent("""\
-    ja = True
-    if ja == True:
-      print('ja')""")
+        ja = True
+        if ja == True:
+          print('ja')""")
 
         result = hedy.transpile(code, self.level)
         self.assertEqual(expected, result.code)
@@ -372,30 +372,6 @@ def test_bool_total(self):
         self.assertEqual(expected, result.code)
         self.assertEqual(False, result.has_turtle)
 
-    def test_and(self):
-        code = textwrap.dedent("""\
-    if 5 is 5 and 4 is 4:
-        print('hallo')""")
-        expected = textwrap.dedent("""\
-    if str('5') == str('5') and str('4') == str('4'):
-      print('hallo')""")
-
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_or(self):
-        code = textwrap.dedent("""\
-    if 5 is 5 or 4 is 4:
-        print('hallo')""")
-        expected = textwrap.dedent("""\
-    if str('5') == str('5') or str('4') == str('4'):
-      print('hallo')""")
-
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
 # programs with issues to see if we catch them properly
 # (so this should fail, for now)
 # at one point we want a real "Indent" error and a better error message
diff --git a/tests/tests_level_15.py b/tests/tests_level_15.py
--- a/tests/tests_level_15.py
+++ b/tests/tests_level_15.py
@@ -47,7 +47,6 @@ def test_print_calculation_times_directly(self):
 
         self.assertEqual("30", self.run_code(result))
 
-
     def test_if_with_indent(self):
         code = textwrap.dedent("""\
 naam is Hedy
@@ -397,62 +396,6 @@ def test_or(self):
         self.assertEqual(expected, result.code)
         self.assertEqual(False, result.has_turtle)
 
-    def test_comment(self):
-        code = textwrap.dedent("""\
-    if 5 is 5 or 4 is 4:
-        print('hallo')
-        #comment""")
-        expected = textwrap.dedent("""\
-    if str('5') == str('5') or str('4') == str('4'):
-      print('hallo')
-      # ['comment']""")
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-
-    def test_comment_with_comma(self):
-        code = textwrap.dedent("""\
-    if 5 is 5 or 4 is 4:
-        print('hallo')
-        # comment1, comment2""")
-
-        expected = textwrap.dedent("""\
-    if str('5') == str('5') or str('4') == str('4'):
-      print('hallo')
-      # [' comment1', ' comment2']""")
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_commentbegin(self):
-        code = textwrap.dedent("""\
-    # comment word
-    if 5 is 5 or 4 is 4:
-        print('hallo')
-        """)
-        expected = textwrap.dedent("""\
-    # [' comment word']
-    if str('5') == str('5') or str('4') == str('4'):
-      print('hallo')""")
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_commentresult(self):
-        code = textwrap.dedent("""\
-    # comment word
-    if 5 is 5 or 4 is 4:
-        print('hallo')
-        """)
-        expected = textwrap.dedent("""\
-    # [' comment word']
-    if str('5') == str('5') or str('4') == str('4'):
-      print('hallo')""")
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
 # programs with issues to see if we catch them properly
 # (so this should fail, for now)
 # at one point we want a real "Indent" error and a better error message
diff --git a/tests/tests_level_16.py b/tests/tests_level_16.py
--- a/tests/tests_level_16.py
+++ b/tests/tests_level_16.py
@@ -410,21 +410,22 @@ def test_comment(self):
         self.assertEqual(expected, result.code)
         self.assertEqual(False, result.has_turtle)
 
-    def test_commentbegin(self):
+
+    def test_comment_with_comma(self):
         code = textwrap.dedent("""\
-    # comment word
     if 5 is 5 or 4 is 4:
         print('hallo')
-        """)
+        # comment1, comment2""")
+
         expected = textwrap.dedent("""\
-    # [' comment word']
     if str('5') == str('5') or str('4') == str('4'):
-      print('hallo')""")
+      print('hallo')
+      # [' comment1', ' comment2']""")
         result = hedy.transpile(code, self.level)
         self.assertEqual(expected, result.code)
         self.assertEqual(False, result.has_turtle)
 
-    def test_commentresult(self):
+    def test_commentbegin(self):
         code = textwrap.dedent("""\
     # comment word
     if 5 is 5 or 4 is 4:
@@ -438,48 +439,16 @@ def test_commentresult(self):
         self.assertEqual(expected, result.code)
         self.assertEqual(False, result.has_turtle)
 
-    def test_smaller(self):
-        code = textwrap.dedent("""\
-    leeftijd is input('Hoe oud ben jij?')
-    if leeftijd < 12:
-        print('Dan ben je jonger dan ik!')""")
-        expected = textwrap.dedent("""\
-    leeftijd = input('Hoe oud ben jij?')
-    if int(leeftijd) < int('12'):
-      print('Dan ben je jonger dan ik!')""")
-
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_bigger(self):
-        code = textwrap.dedent("""\
-    leeftijd is input('Hoe oud ben jij?')
-    if leeftijd > 12:
-        print('Dan ben je ouder dan ik!')""")
-        expected = textwrap.dedent("""\
-    leeftijd = input('Hoe oud ben jij?')
-    if int(leeftijd) > int('12'):
-      print('Dan ben je ouder dan ik!')""")
-
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_big_and_small(self):
+    def test_commentresult(self):
         code = textwrap.dedent("""\
-    leeftijd is input('Hoe oud ben jij?')
-    if leeftijd < 12:
-        print('Dan ben je jonger dan ik!')
-    elif leeftijd > 12:
-        print('Dan ben je ouder dan ik!')""")
+    # comment word
+    if 5 is 5 or 4 is 4:
+        print('hallo')
+        """)
         expected = textwrap.dedent("""\
-    leeftijd = input('Hoe oud ben jij?')
-    if int(leeftijd) < int('12'):
-      print('Dan ben je jonger dan ik!')
-    elif int(leeftijd) > int('12'):
-      print('Dan ben je ouder dan ik!')""")
-
+    # [' comment word']
+    if str('5') == str('5') or str('4') == str('4'):
+      print('hallo')""")
         result = hedy.transpile(code, self.level)
         self.assertEqual(expected, result.code)
         self.assertEqual(False, result.has_turtle)
diff --git a/tests/tests_level_17.py b/tests/tests_level_17.py
--- a/tests/tests_level_17.py
+++ b/tests/tests_level_17.py
@@ -47,6 +47,7 @@ def test_print_calculation_times_directly(self):
 
         self.assertEqual("30", self.run_code(result))
 
+
     def test_if_with_indent(self):
         code = textwrap.dedent("""\
 naam is Hedy
@@ -483,66 +484,6 @@ def test_big_and_small(self):
         self.assertEqual(expected, result.code)
         self.assertEqual(False, result.has_turtle)
 
-    def test_whileloop(self):
-        code = textwrap.dedent("""\
-    goedantwoord is False
-    while goedantwoord is False:
-        antwoord is input('Wat is 5 keer 5?')
-        if antwoord is 25:
-            goedantwoord is True""")
-        expected = textwrap.dedent("""\
-    goedantwoord = False
-    while goedantwoord == False:
-      antwoord = input('Wat is 5 keer 5?')
-      if str(antwoord) == str('25'):
-        goedantwoord = True""")
-
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_whileloop2(self):
-        code = textwrap.dedent("""\
-    tel is 1
-    # we gaan door totdat tel 3 is!
-    while tel < 3:
-        print('Dit is de ' tel 'e keer')
-        tel is tel + 1
-    print('We zijn klaar')""")
-        expected = textwrap.dedent("""\
-    tel = '1'
-    # [' we gaan door totdat tel 3 is!']
-    while int(tel) < int('3'):
-      print('Dit is de '+str(tel)+'e keer')
-      tel = int(tel) + int(1)
-    print('We zijn klaar')""")
-
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_whileloop3(self):
-        code = textwrap.dedent("""\
-    goedantwoord is False
-    # we gaan door totdat een goed antwoord is gegeven!
-    while goedantwoord is False:
-        antwoord is input('Wat is 5 keer 5?')
-        if antwoord is 25:
-            goedantwoord is True
-            print('Er is een goed antwoord gegeven')""")
-        expected = textwrap.dedent("""\
-    goedantwoord = False
-    # [' we gaan door totdat een goed antwoord is gegeven!']
-    while goedantwoord == False:
-      antwoord = input('Wat is 5 keer 5?')
-      if str(antwoord) == str('25'):
-        goedantwoord = True
-        print('Er is een goed antwoord gegeven')""")
-
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
 # programs with issues to see if we catch them properly
 # (so this should fail, for now)
 # at one point we want a real "Indent" error and a better error message
diff --git a/tests/tests_level_18.py b/tests/tests_level_18.py
--- a/tests/tests_level_18.py
+++ b/tests/tests_level_18.py
@@ -47,7 +47,6 @@ def test_print_calculation_times_directly(self):
 
         self.assertEqual("30", self.run_code(result))
 
-
     def test_if_with_indent(self):
         code = textwrap.dedent("""\
 naam is Hedy
@@ -544,24 +543,6 @@ def test_whileloop3(self):
         self.assertEqual(expected, result.code)
         self.assertEqual(False, result.has_turtle)
 
-    def test_access_plus(self):
-        code = textwrap.dedent("""\
-    lijst is ['1', '2', '3']
-    optellen is lijst[1] + lijst[2]
-    optellen is optellen + lijst[3]
-    # we verwachten hier 6
-    print(optellen)""")
-        expected = textwrap.dedent("""\
-    lijst = ['1', '2', '3']
-    optellen = int(lijst[1-1]) + int(lijst[2-1])
-    optellen = int(optellen) + int(lijst[3-1])
-    # [' we verwachten hier 6']
-    print(str(optellen))""")
-
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
 # programs with issues to see if we catch them properly
 # (so this should fail, for now)
 # at one point we want a real "Indent" error and a better error message
diff --git a/tests/tests_level_19.py b/tests/tests_level_19.py
--- a/tests/tests_level_19.py
+++ b/tests/tests_level_19.py
@@ -4,6 +4,7 @@
 
 class TestsLevel19(HedyTester):
     level = 19
+
     def test_print(self):
         result = hedy.transpile("print('ik heet')", self.level)
         expected = "print('ik heet')"
@@ -46,6 +47,7 @@ def test_print_calculation_times_directly(self):
 
         self.assertEqual("30", self.run_code(result))
 
+
     def test_if_with_indent(self):
         code = textwrap.dedent("""\
 naam is Hedy
@@ -559,51 +561,6 @@ def test_access_plus(self):
         result = hedy.transpile(code, self.level)
         self.assertEqual(expected, result.code)
         self.assertEqual(False, result.has_turtle)
-    def test_length(self):
-        code = textwrap.dedent("""\
-    fruit is ['appel', 'banaan', 'kers']
-    hoi is length(fruit)
-    print(hoi)""")
-        expected = textwrap.dedent("""\
-    fruit = ['appel', 'banaan', 'kers']
-    hoi = len(fruit)
-    print(str(hoi))""")
-
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_length2(self):
-        code = textwrap.dedent("""\
-    fruit is ['appel', 'banaan', 'kers']
-    for i in range(1, length(fruit)):
-        print(fruit[i])""")
-        expected = textwrap.dedent("""\
-    fruit = ['appel', 'banaan', 'kers']
-    step = 1 if int(1) < int(len(fruit)) else -1
-    for i in range(int(1), int(len(fruit)) + step, step):
-      print(str(fruit[i-1]))""")
-
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_print_length(self):
-        code = textwrap.dedent("""\
-    fruit is ['appel', 'banaan', 'kers']
-    print('lengte van de lijst is' length(fruit))
-    for i in range(1, 3):
-        print(fruit[i])""")
-        expected = textwrap.dedent("""\
-    fruit = ['appel', 'banaan', 'kers']
-    print('lengte van de lijst is'+str(len(fruit)))
-    step = 1 if int(1) < int(3) else -1
-    for i in range(int(1), int(3) + step, step):
-      print(str(fruit[i-1]))""")
-
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
 
 # programs with issues to see if we catch them properly
 # (so this should fail, for now)
diff --git a/tests/tests_level_20.py b/tests/tests_level_20.py
--- a/tests/tests_level_20.py
+++ b/tests/tests_level_20.py
@@ -2,9 +2,8 @@
 import textwrap
 from tests_level_01 import HedyTester
 
-class TestsLevel15(HedyTester):
+class TestsLevel20(HedyTester):
     level = 20
-
     def test_print(self):
         result = hedy.transpile("print('ik heet')", self.level)
         expected = "print('ik heet')"
@@ -12,7 +11,7 @@ def test_print(self):
         self.assertEqual(False, result.has_turtle)
 
     def test_print_with_var(self):
-        result = hedy.transpile("naam = Hedy\nprint('ik heet' naam)", self.level)
+        result = hedy.transpile("naam is Hedy\nprint('ik heet' naam)", self.level)
         expected = "naam = 'Hedy'\nprint('ik heet'+str(naam))"
         self.assertEqual(expected, result.code)
         self.assertEqual(False, result.has_turtle)
@@ -24,15 +23,15 @@ def test_print_with_calc_no_spaces(self):
         self.assertEqual(False, result.has_turtle)
 
     def test_ask(self):
-        result = hedy.transpile("antwoord = input('wat is je lievelingskleur?')", self.level)
+        result = hedy.transpile("antwoord is input('wat is je lievelingskleur?')", self.level)
         expected = "antwoord = input('wat is je lievelingskleur?')"
         self.assertEqual(expected, result.code)
         self.assertEqual(False, result.has_turtle)
 
     def test_print_calculation_times_directly(self):
         code = textwrap.dedent("""\
-    nummer = 5
-    nummertwee = 6
+    nummer is 5
+    nummertwee is 6
     print(nummer * nummertwee)""")
 
         result = hedy.transpile(code, self.level)
@@ -47,74 +46,10 @@ def test_print_calculation_times_directly(self):
 
         self.assertEqual("30", self.run_code(result))
 
-    def test_allow_space_after_else_line(self):
-
-        code = textwrap.dedent("""\
-        if a == 1:
-          print(a)
-        else:   
-          print('nee')""")
-
-        expected = textwrap.dedent("""\
-        if str(a) == str('1'):
-          print(str(a))
-        else:
-          print('nee')""")
-
-        self.multi_level_tester(
-            code=code,
-            max_level=22,
-            expected=expected,
-            test_name=self.test_name(),
-            extra_check_function=self.is_not_turtle()
-        )
-
-
-
-    def test_allow_space_before_colon(self):
-        code = textwrap.dedent("""\
-        if a == 1  :
-          print(a)
-        else:   
-          print('nee')""")
-
-        expected = textwrap.dedent("""\
-        if str(a) == str('1'):
-          print(str(a))
-        else:
-          print('nee')""")
-
-        self.multi_level_tester(
-            code=code,
-            max_level=22,
-            expected=expected,
-            test_name=self.test_name(),
-        )
-
-    def test_random(self):
-        code = textwrap.dedent("""\
-        dieren = ['Hond', 'Kat', 'Kangoeroe']
-        print(dieren[random])""")
-
-        expected = textwrap.dedent("""\
-        dieren = ['Hond', 'Kat', 'Kangoeroe']
-        print(str(random.choice(dieren)))""")
-
-        # check if result is in the expected list
-        check_in_list = (lambda x: self.run_code(x) in ['Hond', 'Kat', 'Kangoeroe'])
-
-        self.multi_level_tester(
-        max_level=22,
-        code=code,
-        expected=expected,
-        test_name=self.test_name(),
-        extra_check_function=check_in_list
-        )
-
     def test_if_with_indent(self):
         code = textwrap.dedent("""\
-naam = Hedy
-if naam == Hedy:
+naam is Hedy
+if naam is Hedy:
     print('koekoek')""")
         expected = textwrap.dedent("""\
 naam = 'Hedy'
@@ -127,8 +62,8 @@ def test_if_with_indent(self):
 
     def test_if_else(self):
         code = textwrap.dedent("""\
-antwoord = input('Hoeveel is 10 plus 10?')
-if antwoord == 20:
+antwoord is input('Hoeveel is 10 plus 10?')
+if antwoord is 20:
     print('Goedzo!')
     print('Het antwoord was inderdaad ' antwoord)
 else:
@@ -150,8 +85,8 @@ def test_if_else(self):
 
     def test_print_random(self):
         code = textwrap.dedent("""\
-    keuzes = ['steen', 'schaar', 'papier']
-    computerkeuze = keuzes[random]
+    keuzes is ['steen', 'schaar', 'papier']
+    computerkeuze is keuzes[random]
     print('computer koos ' computerkeuze)""")
         expected = textwrap.dedent("""\
     keuzes = ['steen', 'schaar', 'papier']
@@ -164,11 +99,11 @@ def test_print_random(self):
 
     def test_for_loop(self):
         code = textwrap.dedent("""\
-    a = 2
-    a = 3
+    a is 2
+    a is 3
     for a in range(2,4):
-      a = a + 2
-      b = b + 2""")
+      a is a + 2
+      b is b + 2""")
         expected = textwrap.dedent("""\
     a = '2'
     a = '3'
@@ -183,11 +118,11 @@ def test_for_loop(self):
 
     def test_if__else(self):
         code = textwrap.dedent("""\
-    a = 5
-    if a == 1:
-      x = 2
+    a is 5
+    if a is 1:
+      x is 2
     else:
-      x = 222""")
+      x is 222""")
         expected = textwrap.dedent("""\
     a = '5'
     if str(a) == str('1'):
@@ -232,10 +167,10 @@ def test_for_nesting(self):
 
     def test_if_nesting(self):
         code = textwrap.dedent("""\
-    kleur = blauw
-    kleurtwee = geel
-    if kleur == blauw:
-      if kleurtwee == geel:
+    kleur is blauw
+    kleurtwee is geel
+    if kleur is blauw:
+      if kleurtwee is geel:
         print('Samen is dit groen!')""")
         expected = textwrap.dedent("""\
     kleur = 'blauw'
@@ -250,7 +185,7 @@ def test_if_nesting(self):
 
     def test_newprint(self):
         code = textwrap.dedent("""\
-    leeftijd = input('Hoe oud ben jij?')
+    leeftijd is input('Hoe oud ben jij?')
     print('Dus jij hebt zo veel verjaardagen gehad:')
     for i in range(0,leeftijd):
         print(i)""")
@@ -267,7 +202,7 @@ def test_newprint(self):
 
     def test_list(self):
         code = textwrap.dedent("""\
-    fruit = ['appel', 'banaan', 'kers']
+    fruit is ['appel', 'banaan', 'kers']
     print(fruit)""")
         expected = textwrap.dedent("""\
     fruit = ['appel', 'banaan', 'kers']
@@ -277,10 +212,24 @@ def test_list(self):
         self.assertEqual(expected, result.code)
         self.assertEqual(False, result.has_turtle)
 
-    def test_specific_access(self):
+    def test_random(self):
         code = textwrap.dedent("""\
+    fruit is ['banaan', 'appel', 'kers']
+    randomfruit is fruit[random]
+    print(randomfruit)""")
+        expected = textwrap.dedent("""\
     fruit = ['banaan', 'appel', 'kers']
-    eerstefruit = fruit[1]
+    randomfruit=random.choice(fruit)
+    print(str(randomfruit))""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_specific_access(self):
+        code = textwrap.dedent("""\
+    fruit is ['banaan', 'appel', 'kers']
+    eerstefruit is fruit[1]
     print(eerstefruit)""")
         expected = textwrap.dedent("""\
     fruit = ['banaan', 'appel', 'kers']
@@ -294,13 +243,13 @@ def test_specific_access(self):
     # note that print(str(highscore)) will not print as it will compare 'score[i]' as str to a variable
     def test_everything_combined(self):
         code = textwrap.dedent("""\
-    score = ['100', '300', '500']
-    highscore = score[random]
+    score is ['100', '300', '500']
+    highscore is score[random]
     print('De highscore is: ' highscore)
     for i in range(1,3):
-        scorenu = score[i]
+        scorenu is score[i]
         print('Score is nu ' scorenu)
-        if highscore == score[i]:
+        if highscore is score[i]:
             print(highscore)""")
         expected = textwrap.dedent("""\
     score = ['100', '300', '500']
@@ -320,13 +269,13 @@ def test_everything_combined(self):
     def test_if_under_else_in_for(self):
         code = textwrap.dedent("""\
     for i in range(0, 10):
-      antwoord = input('Wat is 5*5')
-      if antwoord == 24:
+      antwoord is input('Wat is 5*5')
+      if antwoord is 24:
         print('Dat is fout!')
       else:
         print('Dat is goed!')
-      if antwoord == 25:
-        i = 10""")
+      if antwoord is 25:
+        i is 10""")
 
         expected = textwrap.dedent("""\
     step = 1 if int(0) < int(10) else -1
@@ -345,8 +294,8 @@ def test_if_under_else_in_for(self):
 
     def test_bool_true(self):
         code = textwrap.dedent("""\
-    ja = True
-    if ja == True:
+    ja is True
+    if ja is True:
         print('ja')""")
         expected = textwrap.dedent("""\
     ja = True
@@ -359,8 +308,8 @@ def test_bool_true(self):
 
     def test_bool_false(self):
         code = textwrap.dedent("""\
-    ja = False
-    if ja == False:
+    ja is False
+    if ja is False:
         print('ja')""")
         expected = textwrap.dedent("""\
     ja = False
@@ -372,8 +321,8 @@ def test_bool_false(self):
 
     def test_bool_true2(self):
         code = textwrap.dedent("""\
-    ja = true
-    if ja == True:
+    ja is true
+    if ja is True:
         print('ja')""")
         expected = textwrap.dedent("""\
     ja = True
@@ -386,8 +335,8 @@ def test_bool_true2(self):
 
     def test_bool_false2(self):
         code = textwrap.dedent("""\
-    ja = false
-    if ja == False:
+    ja is false
+    if ja is False:
         print('ja')""")
         expected = textwrap.dedent("""\
     ja = False
@@ -400,13 +349,13 @@ def test_bool_false2(self):
 
     def test_bool_total(self):
         code = textwrap.dedent("""\
-    jebenternog = False
-    benjeernog = input('ben je er nog? ja of nee?')
-    if benjeernog == ja:
-        jebenternog = True
-    if jebenternog == True:
+    jebenternog is False
+    benjeernog is input('ben je er nog? ja of nee?')
+    if benjeernog is ja:
+        jebenternog is True
+    if jebenternog is True:
         print('Hallo!')
-    if jebenternog == False:
+    if jebenternog is False:
         print('Doei!')""")
         expected = textwrap.dedent("""\
     jebenternog = False
@@ -424,7 +373,7 @@ def test_bool_total(self):
 
     def test_and(self):
         code = textwrap.dedent("""\
-    if 5 == 5 and 4 == 4:
+    if 5 is 5 and 4 is 4:
         print('hallo')""")
         expected = textwrap.dedent("""\
     if str('5') == str('5') and str('4') == str('4'):
@@ -436,7 +385,7 @@ def test_and(self):
 
     def test_or(self):
         code = textwrap.dedent("""\
-    if 5 == 5 or 4 == 4:
+    if 5 is 5 or 4 is 4:
         print('hallo')""")
         expected = textwrap.dedent("""\
     if str('5') == str('5') or str('4') == str('4'):
@@ -448,7 +397,7 @@ def test_or(self):
 
     def test_comment(self):
         code = textwrap.dedent("""\
-    if 5 == 5 or 4 == 4:
+    if 5 is 5 or 4 is 4:
         print('hallo')
         #comment""")
         expected = textwrap.dedent("""\
@@ -462,7 +411,7 @@ def test_comment(self):
     def test_commentbegin(self):
         code = textwrap.dedent("""\
     # comment word
-    if 5 == 5 or 4 == 4:
+    if 5 is 5 or 4 is 4:
         print('hallo')
         """)
         expected = textwrap.dedent("""\
@@ -476,7 +425,7 @@ def test_commentbegin(self):
     def test_commentresult(self):
         code = textwrap.dedent("""\
     # comment word
-    if 5 == 5 or 4 == 4:
+    if 5 is 5 or 4 is 4:
         print('hallo')
         """)
         expected = textwrap.dedent("""\
@@ -489,7 +438,7 @@ def test_commentresult(self):
 
     def test_smaller(self):
         code = textwrap.dedent("""\
-    leeftijd = input('Hoe oud ben jij?')
+    leeftijd is input('Hoe oud ben jij?')
     if leeftijd < 12:
         print('Dan ben je jonger dan ik!')""")
         expected = textwrap.dedent("""\
@@ -503,7 +452,7 @@ def test_smaller(self):
 
     def test_bigger(self):
         code = textwrap.dedent("""\
-    leeftijd = input('Hoe oud ben jij?')
+    leeftijd is input('Hoe oud ben jij?')
     if leeftijd > 12:
         print('Dan ben je ouder dan ik!')""")
         expected = textwrap.dedent("""\
@@ -517,7 +466,7 @@ def test_bigger(self):
 
     def test_big_and_small(self):
         code = textwrap.dedent("""\
-    leeftijd = input('Hoe oud ben jij?')
+    leeftijd is input('Hoe oud ben jij?')
     if leeftijd < 12:
         print('Dan ben je jonger dan ik!')
     elif leeftijd > 12:
@@ -535,11 +484,11 @@ def test_big_and_small(self):
 
     def test_whileloop(self):
         code = textwrap.dedent("""\
-    goedantwoord = False
-    while goedantwoord == False:
-        antwoord = input('Wat is 5 keer 5?')
-        if antwoord == 25:
-            goedantwoord = True""")
+    goedantwoord is False
+    while goedantwoord is False:
+        antwoord is input('Wat is 5 keer 5?')
+        if antwoord is 25:
+            goedantwoord is True""")
         expected = textwrap.dedent("""\
     goedantwoord = False
     while goedantwoord == False:
@@ -553,11 +502,11 @@ def test_whileloop(self):
 
     def test_whileloop2(self):
         code = textwrap.dedent("""\
-    tel = 1
+    tel is 1
     # we gaan door totdat tel 3 is!
     while tel < 3:
         print('Dit is de ' tel 'e keer')
-        tel = tel + 1
+        tel is tel + 1
     print('We zijn klaar')""")
         expected = textwrap.dedent("""\
     tel = '1'
@@ -573,12 +522,12 @@ def test_whileloop2(self):
 
     def test_whileloop3(self):
         code = textwrap.dedent("""\
-    goedantwoord = False
+    goedantwoord is False
     # we gaan door totdat een goed antwoord is gegeven!
-    while goedantwoord == False:
-        antwoord = input('Wat is 5 keer 5?')
-        if antwoord == 25:
-            goedantwoord = True
+    while goedantwoord is False:
+        antwoord is input('Wat is 5 keer 5?')
+        if antwoord is 25:
+            goedantwoord is True
             print('Er is een goed antwoord gegeven')""")
         expected = textwrap.dedent("""\
     goedantwoord = False
@@ -595,9 +544,9 @@ def test_whileloop3(self):
 
     def test_access_plus(self):
         code = textwrap.dedent("""\
-    lijst = ['1', '2', '3']
-    optellen = lijst[1] + lijst[2]
-    optellen = optellen + lijst[3]
+    lijst is ['1', '2', '3']
+    optellen is lijst[1] + lijst[2]
+    optellen is optellen + lijst[3]
     # we verwachten hier 6
     print(optellen)""")
         expected = textwrap.dedent("""\
@@ -612,8 +561,8 @@ def test_access_plus(self):
         self.assertEqual(False, result.has_turtle)
     def test_length(self):
         code = textwrap.dedent("""\
-    fruit = ['appel', 'banaan', 'kers']
-    hoi = length(fruit)
+    fruit is ['appel', 'banaan', 'kers']
+    hoi is length(fruit)
     print(hoi)""")
         expected = textwrap.dedent("""\
     fruit = ['appel', 'banaan', 'kers']
@@ -626,7 +575,7 @@ def test_length(self):
 
     def test_length2(self):
         code = textwrap.dedent("""\
-    fruit = ['appel', 'banaan', 'kers']
+    fruit is ['appel', 'banaan', 'kers']
     for i in range(1, length(fruit)):
         print(fruit[i])""")
         expected = textwrap.dedent("""\
@@ -641,7 +590,7 @@ def test_length2(self):
 
     def test_print_length(self):
         code = textwrap.dedent("""\
-    fruit = ['appel', 'banaan', 'kers']
+    fruit is ['appel', 'banaan', 'kers']
     print('lengte van de lijst is' length(fruit))
     for i in range(1, 3):
         print(fruit[i])""")
@@ -656,70 +605,6 @@ def test_print_length(self):
         self.assertEqual(expected, result.code)
         self.assertEqual(False, result.has_turtle)
 
-    def test_sum_in_if(self):
-        code = textwrap.dedent("""\
-    if 5+3 == 8:
-        print('5+3 is inderdaad 8')
-    else:
-        print('Dit wordt niet geprint want 5+3 is 8!')""")
-        expected = textwrap.dedent("""\
-    if int(5) + int(3) == int(8):
-      print('5+3 is inderdaad 8')
-    else:
-      print('Dit wordt niet geprint want 5+3 is 8!')""")
-
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_sum_in_right_side_if(self):
-        code = textwrap.dedent("""\
-    if 8 == 5+3:
-        print('5+3 is inderdaad 8')
-    else:
-        print('Dit wordt niet geprint want 5+3 is 8!')""")
-        expected = textwrap.dedent("""\
-    if int(8) == int(5) + int(3):
-      print('5+3 is inderdaad 8')
-    else:
-      print('Dit wordt niet geprint want 5+3 is 8!')""")
-
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_min_in_if(self):
-        code = textwrap.dedent("""\
-    if 5-3 == 2:
-        print('5-3 is inderdaad 2')
-    else:
-        print('Dit wordt niet geprint want 5+3 is 8!')""")
-        expected = textwrap.dedent("""\
-    if int(5) - int(3) == int(2):
-      print('5-3 is inderdaad 2')
-    else:
-      print('Dit wordt niet geprint want 5+3 is 8!')""")
-
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_multiply_in_if(self):
-        code = textwrap.dedent("""\
-    if 5*3 == 15:
-        print('5*3 is inderdaad 15')
-    else:
-        print('Dit wordt niet geprint want 5+3 is 8!')""")
-        expected = textwrap.dedent("""\
-    if int(5) * int(3) == int(15):
-      print('5*3 is inderdaad 15')
-    else:
-      print('Dit wordt niet geprint want 5+3 is 8!')""")
-
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
 # programs with issues to see if we catch them properly
 # (so this should fail, for now)
 # at one point we want a real "Indent" error and a better error message
diff --git a/tests/tests_level_21.py b/tests/tests_level_21.py
--- a/tests/tests_level_21.py
+++ b/tests/tests_level_21.py
@@ -47,6 +47,70 @@ def test_print_calculation_times_directly(self):
 
         self.assertEqual("30", self.run_code(result))
 
+    def test_allow_space_after_else_line(self):
+
+        code = textwrap.dedent("""\
+        if a == 1:
+          print(a)
+        else:   
+          print('nee')""")
+
+        expected = textwrap.dedent("""\
+        if str(a) == str('1'):
+          print(str(a))
+        else:
+          print('nee')""")
+
+        self.multi_level_tester(
+            code=code,
+            max_level=22,
+            expected=expected,
+            test_name=self.name(),
+            extra_check_function=self.is_not_turtle()
+        )
+
+
+
+    def test_allow_space_before_colon(self):
+        code = textwrap.dedent("""\
+        if a == 1  :
+          print(a)
+        else:   
+          print('nee')""")
+
+        expected = textwrap.dedent("""\
+        if str(a) == str('1'):
+          print(str(a))
+        else:
+          print('nee')""")
+
+        self.multi_level_tester(
+            code=code,
+            max_level=22,
+            expected=expected,
+            test_name=self.name(),
+        )
+
+    def test_random(self):
+        code = textwrap.dedent("""\
+        dieren = ['Hond', 'Kat', 'Kangoeroe']
+        print(dieren[random])""")
+
+        expected = textwrap.dedent("""\
+        dieren = ['Hond', 'Kat', 'Kangoeroe']
+        print(str(random.choice(dieren)))""")
+
+        # check if result is in the expected list
+        check_in_list = (lambda x: self.run_code(x) in ['Hond', 'Kat', 'Kangoeroe'])
+
+        self.multi_level_tester(
+        max_level=22,
+        code=code,
+        expected=expected,
+        test_name=self.name(),
+        extra_check_function=check_in_list
+        )
+
     def test_if_with_indent(self):
         code = textwrap.dedent("""\
 naam = Hedy
@@ -64,7 +128,7 @@ def test_if_with_indent(self):
     def test_if_else(self):
         code = textwrap.dedent("""\
 antwoord = input('Hoeveel is 10 plus 10?')
-if antwoord == 21:
+if antwoord == 20:
     print('Goedzo!')
     print('Het antwoord was inderdaad ' antwoord)
 else:
@@ -73,7 +137,7 @@ def test_if_else(self):
 
         expected = textwrap.dedent("""\
 antwoord = input('Hoeveel is 10 plus 10?')
-if str(antwoord) == str('21'):
+if str(antwoord) == str('20'):
   print('Goedzo!')
   print('Het antwoord was inderdaad '+str(antwoord))
 else:
@@ -213,20 +277,6 @@ def test_list(self):
         self.assertEqual(expected, result.code)
         self.assertEqual(False, result.has_turtle)
 
-    def test_random(self):
-        code = textwrap.dedent("""\
-    fruit = ['banaan', 'appel', 'kers']
-    randomfruit = fruit[random]
-    print(randomfruit)""")
-        expected = textwrap.dedent("""\
-    fruit = ['banaan', 'appel', 'kers']
-    randomfruit=random.choice(fruit)
-    print(str(randomfruit))""")
-
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
     def test_specific_access(self):
         code = textwrap.dedent("""\
     fruit = ['banaan', 'appel', 'kers']
@@ -606,40 +656,6 @@ def test_print_length(self):
         self.assertEqual(expected, result.code)
         self.assertEqual(False, result.has_turtle)
 
-    def test_not_equal_one(self):
-        code = textwrap.dedent("""\
-    land = input('In welk land woon jij?')
-    if land != Nederland:
-        print('Cool!')
-    else:
-        print('Ik kom ook uit Nederland!')""")
-        expected = textwrap.dedent("""\
-    land = input('In welk land woon jij?')
-    if str(land) != str('Nederland'):
-      print('Cool!')
-    else:
-      print('Ik kom ook uit Nederland!')""")
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_not_equal_two(self):
-        code = textwrap.dedent("""\
-    getal = input('Je mag geen 5 zeggen, wat is een leuk getal?')
-    if getal != 5:
-        print('Goed zo!')
-    else:
-        print('Fout! Je mocht geen 5 zeggen')""")
-        expected = textwrap.dedent("""\
-    getal = input('Je mag geen 5 zeggen, wat is een leuk getal?')
-    if str(getal) != str('5'):
-      print('Goed zo!')
-    else:
-      print('Fout! Je mocht geen 5 zeggen')""")
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
     def test_sum_in_if(self):
         code = textwrap.dedent("""\
     if 5+3 == 8:
@@ -703,6 +719,7 @@ def test_multiply_in_if(self):
         result = hedy.transpile(code, self.level)
         self.assertEqual(expected, result.code)
         self.assertEqual(False, result.has_turtle)
+
 # programs with issues to see if we catch them properly
 # (so this should fail, for now)
 # at one point we want a real "Indent" error and a better error message
diff --git a/tests/tests_level_22.py b/tests/tests_level_22.py
--- a/tests/tests_level_22.py
+++ b/tests/tests_level_22.py
@@ -64,7 +64,7 @@ def test_if_with_indent(self):
     def test_if_else(self):
         code = textwrap.dedent("""\
 antwoord = input('Hoeveel is 10 plus 10?')
-if antwoord == 22:
+if antwoord == 21:
     print('Goedzo!')
     print('Het antwoord was inderdaad ' antwoord)
 else:
@@ -73,7 +73,7 @@ def test_if_else(self):
 
         expected = textwrap.dedent("""\
 antwoord = input('Hoeveel is 10 plus 10?')
-if str(antwoord) == str('22'):
+if str(antwoord) == str('21'):
   print('Goedzo!')
   print('Het antwoord was inderdaad '+str(antwoord))
 else:
@@ -640,49 +640,6 @@ def test_not_equal_two(self):
         self.assertEqual(expected, result.code)
         self.assertEqual(False, result.has_turtle)
 
-    def test_smaller_equal(self):
-        code = textwrap.dedent("""\
-    leeftijd = input('Ik ben 12 jaar, hoe oud ben jij?')
-    if leeftijd <= 11:
-        print('Dan ben je jonger dan ik!')""")
-        expected = textwrap.dedent("""\
-    leeftijd = input('Ik ben 12 jaar, hoe oud ben jij?')
-    if int(leeftijd) <= int('11'):
-      print('Dan ben je jonger dan ik!')""")
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_bigger_equal(self):
-        code = textwrap.dedent("""\
-    leeftijd = input('Ik ben 12 jaar, hoe oud ben jij?')
-    if leeftijd >= 11:
-        print('Dan ben je jonger dan ik!')""")
-        expected = textwrap.dedent("""\
-    leeftijd = input('Ik ben 12 jaar, hoe oud ben jij?')
-    if int(leeftijd) >= int('11'):
-      print('Dan ben je jonger dan ik!')""")
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
-    def test_smaller_bigger_equal(self):
-        code = textwrap.dedent("""\
-    leeftijd = input('Ik ben 12 jaar, hoe oud ben jij?')
-    if leeftijd <= 11:
-        print('Dan ben je jonger dan ik!')
-    elif leeftijd >= 13:
-        print('Dan ben je ouder dan ik!')""")
-        expected = textwrap.dedent("""\
-    leeftijd = input('Ik ben 12 jaar, hoe oud ben jij?')
-    if int(leeftijd) <= int('11'):
-      print('Dan ben je jonger dan ik!')
-    elif int(leeftijd) >= int('13'):
-      print('Dan ben je ouder dan ik!')""")
-        result = hedy.transpile(code, self.level)
-        self.assertEqual(expected, result.code)
-        self.assertEqual(False, result.has_turtle)
-
     def test_sum_in_if(self):
         code = textwrap.dedent("""\
     if 5+3 == 8:
diff --git a/tests/tests_level_23.py b/tests/tests_level_23.py
new file mode 100644
--- /dev/null
+++ b/tests/tests_level_23.py
@@ -0,0 +1,767 @@
+import hedy
+import textwrap
+from tests_level_01 import HedyTester
+
+class TestsLevel23(HedyTester):
+    level = 23
+
+    def test_print(self):
+        result = hedy.transpile("print('ik heet')", self.level)
+        expected = "print('ik heet')"
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_print_with_var(self):
+        result = hedy.transpile("naam = Hedy\nprint('ik heet' naam)", self.level)
+        expected = "naam = 'Hedy'\nprint('ik heet'+str(naam))"
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_print_with_calc_no_spaces(self):
+        result = hedy.transpile("print('5 keer 5 is ' 5*5)", self.level)
+        expected = "print('5 keer 5 is '+str(int(5) * int(5)))"
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_ask(self):
+        result = hedy.transpile("antwoord = input('wat is je lievelingskleur?')", self.level)
+        expected = "antwoord = input('wat is je lievelingskleur?')"
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_print_calculation_times_directly(self):
+        code = textwrap.dedent("""\
+    nummer = 5
+    nummertwee = 6
+    print(nummer * nummertwee)""")
+
+        result = hedy.transpile(code, self.level)
+
+        expected = textwrap.dedent("""\
+    nummer = '5'
+    nummertwee = '6'
+    print(str(int(nummer) * int(nummertwee)))""")
+
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+        self.assertEqual("30", self.run_code(result))
+
+    def test_if_with_indent(self):
+        code = textwrap.dedent("""\
+naam = Hedy
+if naam == Hedy:
+    print('koekoek')""")
+        expected = textwrap.dedent("""\
+naam = 'Hedy'
+if str(naam) == str('Hedy'):
+  print('koekoek')""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_if_else(self):
+        code = textwrap.dedent("""\
+antwoord = input('Hoeveel is 10 plus 10?')
+if antwoord == 22:
+    print('Goedzo!')
+    print('Het antwoord was inderdaad ' antwoord)
+else:
+    print('Foutje')
+    print('Het antwoord moest zijn ' antwoord)""")
+
+        expected = textwrap.dedent("""\
+antwoord = input('Hoeveel is 10 plus 10?')
+if str(antwoord) == str('22'):
+  print('Goedzo!')
+  print('Het antwoord was inderdaad '+str(antwoord))
+else:
+  print('Foutje')
+  print('Het antwoord moest zijn '+str(antwoord))""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_print_random(self):
+        code = textwrap.dedent("""\
+    keuzes = ['steen', 'schaar', 'papier']
+    computerkeuze = keuzes[random]
+    print('computer koos ' computerkeuze)""")
+        expected = textwrap.dedent("""\
+    keuzes = ['steen', 'schaar', 'papier']
+    computerkeuze=random.choice(keuzes)
+    print('computer koos '+str(computerkeuze))""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_for_loop(self):
+        code = textwrap.dedent("""\
+    a = 2
+    a = 3
+    for a in range(2,4):
+      a = a + 2
+      b = b + 2""")
+        expected = textwrap.dedent("""\
+    a = '2'
+    a = '3'
+    step = 1 if int(2) < int(4) else -1
+    for a in range(int(2), int(4) + step, step):
+      a = int(a) + int(2)
+      b = int(b) + int(2)""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_if__else(self):
+        code = textwrap.dedent("""\
+    a = 5
+    if a == 1:
+      x = 2
+    else:
+      x = 222""")
+        expected = textwrap.dedent("""\
+    a = '5'
+    if str(a) == str('1'):
+      x = '2'
+    else:
+      x = '222'""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_forloop(self):
+        code = textwrap.dedent("""\
+    for i in range(1, 10):
+      print(i)
+    print('wie niet weg is is gezien')""")
+        expected = textwrap.dedent("""\
+    step = 1 if int(1) < int(10) else -1
+    for i in range(int(1), int(10) + step, step):
+      print(str(i))
+    print('wie niet weg is is gezien')""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_for_nesting(self):
+        code = textwrap.dedent("""\
+    for i in range(1, 3):
+      for j in range(1,4):
+        print('rondje: ' i ' tel: ' j)""")
+        expected = textwrap.dedent("""\
+    step = 1 if int(1) < int(3) else -1
+    for i in range(int(1), int(3) + step, step):
+      step = 1 if int(1) < int(4) else -1
+      for j in range(int(1), int(4) + step, step):
+        print('rondje: '+str(i)+' tel: '+str(j))""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_if_nesting(self):
+        code = textwrap.dedent("""\
+    kleur = blauw
+    kleurtwee = geel
+    if kleur == blauw:
+      if kleurtwee == geel:
+        print('Samen is dit groen!')""")
+        expected = textwrap.dedent("""\
+    kleur = 'blauw'
+    kleurtwee = 'geel'
+    if str(kleur) == str('blauw'):
+      if str(kleurtwee) == str('geel'):
+        print('Samen is dit groen!')""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_newprint(self):
+        code = textwrap.dedent("""\
+    leeftijd = input('Hoe oud ben jij?')
+    print('Dus jij hebt zo veel verjaardagen gehad:')
+    for i in range(0,leeftijd):
+        print(i)""")
+        expected = textwrap.dedent("""\
+    leeftijd = input('Hoe oud ben jij?')
+    print('Dus jij hebt zo veel verjaardagen gehad:')
+    step = 1 if int(0) < int(leeftijd) else -1
+    for i in range(int(0), int(leeftijd) + step, step):
+      print(str(i))""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_list(self):
+        code = textwrap.dedent("""\
+    fruit = ['appel', 'banaan', 'kers']
+    print(fruit)""")
+        expected = textwrap.dedent("""\
+    fruit = ['appel', 'banaan', 'kers']
+    print(str(fruit))""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_random(self):
+        code = textwrap.dedent("""\
+    fruit = ['banaan', 'appel', 'kers']
+    randomfruit = fruit[random]
+    print(randomfruit)""")
+        expected = textwrap.dedent("""\
+    fruit = ['banaan', 'appel', 'kers']
+    randomfruit=random.choice(fruit)
+    print(str(randomfruit))""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_specific_access(self):
+        code = textwrap.dedent("""\
+    fruit = ['banaan', 'appel', 'kers']
+    eerstefruit = fruit[1]
+    print(eerstefruit)""")
+        expected = textwrap.dedent("""\
+    fruit = ['banaan', 'appel', 'kers']
+    eerstefruit=fruit[1-1]
+    print(str(eerstefruit))""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    # note that print(str(highscore)) will not print as it will compare 'score[i]' as str to a variable
+    def test_everything_combined(self):
+        code = textwrap.dedent("""\
+    score = ['100', '300', '500']
+    highscore = score[random]
+    print('De highscore is: ' highscore)
+    for i in range(1,3):
+        scorenu = score[i]
+        print('Score is nu ' scorenu)
+        if highscore == score[i]:
+            print(highscore)""")
+        expected = textwrap.dedent("""\
+    score = ['100', '300', '500']
+    highscore=random.choice(score)
+    print('De highscore is: '+str(highscore))
+    step = 1 if int(1) < int(3) else -1
+    for i in range(int(1), int(3) + step, step):
+      scorenu=score[i-1]
+      print('Score is nu '+str(scorenu))
+      if str(highscore) == str('score[i]'):
+        print(str(highscore))""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_if_under_else_in_for(self):
+        code = textwrap.dedent("""\
+    for i in range(0, 10):
+      antwoord = input('Wat is 5*5')
+      if antwoord == 24:
+        print('Dat is fout!')
+      else:
+        print('Dat is goed!')
+      if antwoord == 25:
+        i = 10""")
+
+        expected = textwrap.dedent("""\
+    step = 1 if int(0) < int(10) else -1
+    for i in range(int(0), int(10) + step, step):
+      antwoord = input('Wat is 5*5')
+      if str(antwoord) == str('24'):
+        print('Dat is fout!')
+      else:
+        print('Dat is goed!')
+      if str(antwoord) == str('25'):
+        i = '10'""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_bool_true(self):
+        code = textwrap.dedent("""\
+    ja = True
+    if ja == True:
+        print('ja')""")
+        expected = textwrap.dedent("""\
+    ja = True
+    if ja == True:
+      print('ja')""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_bool_false(self):
+        code = textwrap.dedent("""\
+    ja = False
+    if ja == False:
+        print('ja')""")
+        expected = textwrap.dedent("""\
+    ja = False
+    if ja == False:
+      print('ja')""")
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_bool_true2(self):
+        code = textwrap.dedent("""\
+    ja = true
+    if ja == True:
+        print('ja')""")
+        expected = textwrap.dedent("""\
+    ja = True
+    if ja == True:
+      print('ja')""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_bool_false2(self):
+        code = textwrap.dedent("""\
+    ja = false
+    if ja == False:
+        print('ja')""")
+        expected = textwrap.dedent("""\
+    ja = False
+    if ja == False:
+      print('ja')""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_bool_total(self):
+        code = textwrap.dedent("""\
+    jebenternog = False
+    benjeernog = input('ben je er nog? ja of nee?')
+    if benjeernog == ja:
+        jebenternog = True
+    if jebenternog == True:
+        print('Hallo!')
+    if jebenternog == False:
+        print('Doei!')""")
+        expected = textwrap.dedent("""\
+    jebenternog = False
+    benjeernog = input('ben je er nog? ja of nee?')
+    if str(benjeernog) == str('ja'):
+      jebenternog = True
+    if jebenternog == True:
+      print('Hallo!')
+    if jebenternog == False:
+      print('Doei!')""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_and(self):
+        code = textwrap.dedent("""\
+    if 5 == 5 and 4 == 4:
+        print('hallo')""")
+        expected = textwrap.dedent("""\
+    if str('5') == str('5') and str('4') == str('4'):
+      print('hallo')""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_or(self):
+        code = textwrap.dedent("""\
+    if 5 == 5 or 4 == 4:
+        print('hallo')""")
+        expected = textwrap.dedent("""\
+    if str('5') == str('5') or str('4') == str('4'):
+      print('hallo')""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_comment(self):
+        code = textwrap.dedent("""\
+    if 5 == 5 or 4 == 4:
+        print('hallo')
+        #comment""")
+        expected = textwrap.dedent("""\
+    if str('5') == str('5') or str('4') == str('4'):
+      print('hallo')
+      # ['comment']""")
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_commentbegin(self):
+        code = textwrap.dedent("""\
+    # comment word
+    if 5 == 5 or 4 == 4:
+        print('hallo')
+        """)
+        expected = textwrap.dedent("""\
+    # [' comment word']
+    if str('5') == str('5') or str('4') == str('4'):
+      print('hallo')""")
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_commentresult(self):
+        code = textwrap.dedent("""\
+    # comment word
+    if 5 == 5 or 4 == 4:
+        print('hallo')
+        """)
+        expected = textwrap.dedent("""\
+    # [' comment word']
+    if str('5') == str('5') or str('4') == str('4'):
+      print('hallo')""")
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_smaller(self):
+        code = textwrap.dedent("""\
+    leeftijd = input('Hoe oud ben jij?')
+    if leeftijd < 12:
+        print('Dan ben je jonger dan ik!')""")
+        expected = textwrap.dedent("""\
+    leeftijd = input('Hoe oud ben jij?')
+    if int(leeftijd) < int('12'):
+      print('Dan ben je jonger dan ik!')""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_bigger(self):
+        code = textwrap.dedent("""\
+    leeftijd = input('Hoe oud ben jij?')
+    if leeftijd > 12:
+        print('Dan ben je ouder dan ik!')""")
+        expected = textwrap.dedent("""\
+    leeftijd = input('Hoe oud ben jij?')
+    if int(leeftijd) > int('12'):
+      print('Dan ben je ouder dan ik!')""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_big_and_small(self):
+        code = textwrap.dedent("""\
+    leeftijd = input('Hoe oud ben jij?')
+    if leeftijd < 12:
+        print('Dan ben je jonger dan ik!')
+    elif leeftijd > 12:
+        print('Dan ben je ouder dan ik!')""")
+        expected = textwrap.dedent("""\
+    leeftijd = input('Hoe oud ben jij?')
+    if int(leeftijd) < int('12'):
+      print('Dan ben je jonger dan ik!')
+    elif int(leeftijd) > int('12'):
+      print('Dan ben je ouder dan ik!')""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_whileloop(self):
+        code = textwrap.dedent("""\
+    goedantwoord = False
+    while goedantwoord == False:
+        antwoord = input('Wat is 5 keer 5?')
+        if antwoord == 25:
+            goedantwoord = True""")
+        expected = textwrap.dedent("""\
+    goedantwoord = False
+    while goedantwoord == False:
+      antwoord = input('Wat is 5 keer 5?')
+      if str(antwoord) == str('25'):
+        goedantwoord = True""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_whileloop2(self):
+        code = textwrap.dedent("""\
+    tel = 1
+    # we gaan door totdat tel 3 is!
+    while tel < 3:
+        print('Dit is de ' tel 'e keer')
+        tel = tel + 1
+    print('We zijn klaar')""")
+        expected = textwrap.dedent("""\
+    tel = '1'
+    # [' we gaan door totdat tel 3 is!']
+    while int(tel) < int('3'):
+      print('Dit is de '+str(tel)+'e keer')
+      tel = int(tel) + int(1)
+    print('We zijn klaar')""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_whileloop3(self):
+        code = textwrap.dedent("""\
+    goedantwoord = False
+    # we gaan door totdat een goed antwoord is gegeven!
+    while goedantwoord == False:
+        antwoord = input('Wat is 5 keer 5?')
+        if antwoord == 25:
+            goedantwoord = True
+            print('Er is een goed antwoord gegeven')""")
+        expected = textwrap.dedent("""\
+    goedantwoord = False
+    # [' we gaan door totdat een goed antwoord is gegeven!']
+    while goedantwoord == False:
+      antwoord = input('Wat is 5 keer 5?')
+      if str(antwoord) == str('25'):
+        goedantwoord = True
+        print('Er is een goed antwoord gegeven')""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_access_plus(self):
+        code = textwrap.dedent("""\
+    lijst = ['1', '2', '3']
+    optellen = lijst[1] + lijst[2]
+    optellen = optellen + lijst[3]
+    # we verwachten hier 6
+    print(optellen)""")
+        expected = textwrap.dedent("""\
+    lijst = ['1', '2', '3']
+    optellen = int(lijst[1-1]) + int(lijst[2-1])
+    optellen = int(optellen) + int(lijst[3-1])
+    # [' we verwachten hier 6']
+    print(str(optellen))""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+    def test_length(self):
+        code = textwrap.dedent("""\
+    fruit = ['appel', 'banaan', 'kers']
+    hoi = length(fruit)
+    print(hoi)""")
+        expected = textwrap.dedent("""\
+    fruit = ['appel', 'banaan', 'kers']
+    hoi = len(fruit)
+    print(str(hoi))""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_length2(self):
+        code = textwrap.dedent("""\
+    fruit = ['appel', 'banaan', 'kers']
+    for i in range(1, length(fruit)):
+        print(fruit[i])""")
+        expected = textwrap.dedent("""\
+    fruit = ['appel', 'banaan', 'kers']
+    step = 1 if int(1) < int(len(fruit)) else -1
+    for i in range(int(1), int(len(fruit)) + step, step):
+      print(str(fruit[i-1]))""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_print_length(self):
+        code = textwrap.dedent("""\
+    fruit = ['appel', 'banaan', 'kers']
+    print('lengte van de lijst is' length(fruit))
+    for i in range(1, 3):
+        print(fruit[i])""")
+        expected = textwrap.dedent("""\
+    fruit = ['appel', 'banaan', 'kers']
+    print('lengte van de lijst is'+str(len(fruit)))
+    step = 1 if int(1) < int(3) else -1
+    for i in range(int(1), int(3) + step, step):
+      print(str(fruit[i-1]))""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_not_equal_one(self):
+        code = textwrap.dedent("""\
+    land = input('In welk land woon jij?')
+    if land != Nederland:
+        print('Cool!')
+    else:
+        print('Ik kom ook uit Nederland!')""")
+        expected = textwrap.dedent("""\
+    land = input('In welk land woon jij?')
+    if str(land) != str('Nederland'):
+      print('Cool!')
+    else:
+      print('Ik kom ook uit Nederland!')""")
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_not_equal_two(self):
+        code = textwrap.dedent("""\
+    getal = input('Je mag geen 5 zeggen, wat is een leuk getal?')
+    if getal != 5:
+        print('Goed zo!')
+    else:
+        print('Fout! Je mocht geen 5 zeggen')""")
+        expected = textwrap.dedent("""\
+    getal = input('Je mag geen 5 zeggen, wat is een leuk getal?')
+    if str(getal) != str('5'):
+      print('Goed zo!')
+    else:
+      print('Fout! Je mocht geen 5 zeggen')""")
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_smaller_equal(self):
+        code = textwrap.dedent("""\
+    leeftijd = input('Ik ben 12 jaar, hoe oud ben jij?')
+    if leeftijd <= 11:
+        print('Dan ben je jonger dan ik!')""")
+        expected = textwrap.dedent("""\
+    leeftijd = input('Ik ben 12 jaar, hoe oud ben jij?')
+    if int(leeftijd) <= int('11'):
+      print('Dan ben je jonger dan ik!')""")
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_bigger_equal(self):
+        code = textwrap.dedent("""\
+    leeftijd = input('Ik ben 12 jaar, hoe oud ben jij?')
+    if leeftijd >= 11:
+        print('Dan ben je jonger dan ik!')""")
+        expected = textwrap.dedent("""\
+    leeftijd = input('Ik ben 12 jaar, hoe oud ben jij?')
+    if int(leeftijd) >= int('11'):
+      print('Dan ben je jonger dan ik!')""")
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_smaller_bigger_equal(self):
+        code = textwrap.dedent("""\
+    leeftijd = input('Ik ben 12 jaar, hoe oud ben jij?')
+    if leeftijd <= 11:
+        print('Dan ben je jonger dan ik!')
+    elif leeftijd >= 13:
+        print('Dan ben je ouder dan ik!')""")
+        expected = textwrap.dedent("""\
+    leeftijd = input('Ik ben 12 jaar, hoe oud ben jij?')
+    if int(leeftijd) <= int('11'):
+      print('Dan ben je jonger dan ik!')
+    elif int(leeftijd) >= int('13'):
+      print('Dan ben je ouder dan ik!')""")
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_sum_in_if(self):
+        code = textwrap.dedent("""\
+    if 5+3 == 8:
+        print('5+3 is inderdaad 8')
+    else:
+        print('Dit wordt niet geprint want 5+3 is 8!')""")
+        expected = textwrap.dedent("""\
+    if int(5) + int(3) == int(8):
+      print('5+3 is inderdaad 8')
+    else:
+      print('Dit wordt niet geprint want 5+3 is 8!')""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_sum_in_right_side_if(self):
+        code = textwrap.dedent("""\
+    if 8 == 5+3:
+        print('5+3 is inderdaad 8')
+    else:
+        print('Dit wordt niet geprint want 5+3 is 8!')""")
+        expected = textwrap.dedent("""\
+    if int(8) == int(5) + int(3):
+      print('5+3 is inderdaad 8')
+    else:
+      print('Dit wordt niet geprint want 5+3 is 8!')""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_min_in_if(self):
+        code = textwrap.dedent("""\
+    if 5-3 == 2:
+        print('5-3 is inderdaad 2')
+    else:
+        print('Dit wordt niet geprint want 5+3 is 8!')""")
+        expected = textwrap.dedent("""\
+    if int(5) - int(3) == int(2):
+      print('5-3 is inderdaad 2')
+    else:
+      print('Dit wordt niet geprint want 5+3 is 8!')""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+
+    def test_multiply_in_if(self):
+        code = textwrap.dedent("""\
+    if 5*3 == 15:
+        print('5*3 is inderdaad 15')
+    else:
+        print('Dit wordt niet geprint want 5+3 is 8!')""")
+        expected = textwrap.dedent("""\
+    if int(5) * int(3) == int(15):
+      print('5*3 is inderdaad 15')
+    else:
+      print('Dit wordt niet geprint want 5+3 is 8!')""")
+
+        result = hedy.transpile(code, self.level)
+        self.assertEqual(expected, result.code)
+        self.assertEqual(False, result.has_turtle)
+# programs with issues to see if we catch them properly
+# (so this should fail, for now)
+# at one point we want a real "Indent" error and a better error message
+# for this!
+
+# def test_level_7_no_indentation(self):
+#   #test that we get a parse error here
+#   code = textwrap.dedent("""\
+#   antwoord is ask Hoeveel is 10 keer tien?
+#   if antwoord is 100
+#   print 'goed zo'
+#   else
+#   print 'bah slecht'""")
+#
+#   with self.assertRaises(Exception) as context:
+#     result = hedy.transpile(code, 10)
+#   self.assertEqual(str(context.exception), 'Parse')
+
+
diff --git a/tests/tests_z_adventures.py b/tests/tests_z_adventures.py
--- a/tests/tests_z_adventures.py
+++ b/tests/tests_z_adventures.py
@@ -25,7 +25,7 @@ def check_code(filename, level, field_name, code, adventure_name):
         filename_shorter = filename.split("/")[3]
         language = filename_shorter.split(".")[0]
         if not isinstance(E, hedy.CodePlaceholdersPresentException):  # code with blanks is ok!
-            error = f'{language}: adventure {adventure_name} - level #{level} - {field_name}. Error: {E.args[0]}'
+            error = f'{language}: adventure {adventure_name} - level #{level} - {field_name}. Error: {E.args}'
             print(error)
             return error
     return True
diff --git a/tests/tests_z_defaults.py b/tests/tests_z_defaults.py
--- a/tests/tests_z_defaults.py
+++ b/tests/tests_z_defaults.py
@@ -21,13 +21,21 @@ def check_code(filename, level, field_name, code):
     try:
         hedy.transpile(code, int(level))
     except Exception as E:
-        if E.args[0] != 'Has Blanks':  # code with blanks is ok!
+        if len(E.args) == 0:
             filename_shorter = filename.split("/")[3]
             language = filename_shorter.split(".")[0]
-            error = f'{language}: level #{level} - {field_name}. Error: {E.args[0]}'
+            error = f'{language}: level #{level} - {field_name}. Error: {E.args}'
             # We print the error for readability, since otherwise they get accumulated on a long list
-            print (error)
+            print(error)
             return error
+        else:
+            if E.args[0] != 'Has Blanks':  # code with blanks is ok!
+                filename_shorter = filename.split("/")[3]
+                language = filename_shorter.split(".")[0]
+                error = f'{language}: level #{level} - {field_name}. Error: {E.args[0]}'
+                # We print the error for readability, since otherwise they get accumulated on a long list
+                print(error)
+                return error
     return True
 
 class TestsLevelDefaultsPrograms(unittest.TestCase):