0

hi
I want to write this code in do while or if else, or any other way except for loop. here is the code

for i in range(65,90):
     for j in range(65,90):
         for k in range(65,90):             
             token=chr(i)+chr(j)+chr(k)	 	    
             block = ((i<<16)+(j<<8)+(k))             
             cblock = pow(block,e,n)
             table[token]=cblock

can anyone please help me to write this in anyother format?
thanks

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by leegeorg07
0

hi
I want to write this code in do while or if else, or any other way except for loop. here is the code

for i in range(65,90):
     for j in range(65,90):
         for k in range(65,90):             
             token=chr(i)+chr(j)+chr(k)	 	    
             block = ((i<<16)+(j<<8)+(k))             
             cblock = pow(block,e,n)
             table[token]=cblock

can anyone please help me to write this in anyother format?
thanks

Why are you looking to get away from the for loop? I believe that is the easiest and most straight forward way to do this....

Note: range(65,90) will only give you letters A through Y. You're missing out on the 'Z'; although perhaps that's what you had intended...

0

i think they just want to see if there is any other way to do it, i like to do this every so often to try different things.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.