Home > Software engineering >  I want to make a loop of this code so that if the ord(message) entered is more than 124 it comes bac
I want to make a loop of this code so that if the ord(message) entered is more than 124 it comes bac

Time:02-10

message = input("Enter a message: ")
list1 = []
for i in range(len(message)):
if ord(message[i])>124 then  3-127
list1.append(chr(ord(message[i]) 3))
print("".join(list1))

I want to make a loop of this code so that if the ord(message) entered is more than 124 it comes back to 0 and if the ord(message) is less than 124 then the loop will break. How can I make this loop?

CodePudding user response:

  •  Tags:  
  • Related