Beispiel #1
0
 def print_statement(self):
     self.humanoid_print('print(' + random.choice([
         Generators.get_statement(),
         Generators.generate_number(),
         Generators.generate_function_name(),
         Generators.generate_variable_name()
     ]) + ')')
     self.followup = False
Beispiel #2
0
 def if_inline_statement(self):
     self.humanoid_print(Generators.generate_variable_name() + ' = ' +
                         Generators.generate_value() + ' if (' +
                         Generators.get_statement() + ') else ' +
                         Generators.generate_value())
     self.followup = False
Beispiel #3
0
 def assign_var_value(self):
     random_var = Generators.generate_variable_name()
     output = random_var + ' = ' + Generators.generate_value()
     self.humanoid_print(output)
     self.followup = False