From d5155c48b3bb3ae83f1439d1dc7d57621e0bd05d Mon Sep 17 00:00:00 2001 From: vista-man <524715@vistacollege.nl> Date: Tue, 28 Jan 2025 13:34:27 +0100 Subject: [PATCH] Add user input for string reversal and delay before output --- Python/omgedraaide string/string.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Python/omgedraaide string/string.py b/Python/omgedraaide string/string.py index fa5288f..8bdef89 100644 --- a/Python/omgedraaide string/string.py +++ b/Python/omgedraaide string/string.py @@ -1,2 +1,7 @@ +import time + +# Vraag de gebruiker om een string in te voeren +input_string = input("Voer een string in: ") # Print de omgekeerde string -print("Deez"[::-1]) # Output: "zeeD" \ No newline at end of file +print(input_string[::-1]) # Output: "zeeD" +time.sleep(2) \ No newline at end of file