But on our route to re-do our Caesar Cipher in Python (which they had done in Scratch already) is to make a simple "string inversion" cipher.
A perfect vehicle to start exploring the while loop (since we have really only seen the for loop up until now).
Here is the official code:
mensaje_original = input("Qué es tu mensaje? ")
descifrado = ""
i = len(mensaje_original) - 1
while i >= 0 :
descifrado = descifrado + mensaje_original
i = i - 1
print(descifrado)
And then Sylvia sent me:
mensaje="python es muy cool"
mensaje_invertido="".join(reversed(mensaje))
print(mensaje_invertido)
Haha dang. Sure my point was to teach the while loop but this is definitely a programmer's reply to a teacher! Three lines, three steps. Mine has more lines and of coruse the longer the message the longer it would likely take.
Well done Sylvia, really thinking like a programmer!