InahoKaizuka
InahoKaizuka
MModular
Created by InahoKaizuka on 10/30/2023 in #questions
My code is not working
let builtins = Python.import('builtins'); let array = Python.import('array'); the import on both of these is red and swiggly, the full code is from python import Python; let builtins = Python.import('builtins'); let array = Python.import('array'); fn reverse_words(input: String): var words: String[] = builtins.input.split(" ");
var reversed: String = words.reverse().join(" ");
return reversed; fn main(): var input = builtins.input("Enter a sentence: "); var reversed_text = reverse_words(input); builtins.print("Reversed text: " + reversed_text);
2 replies