Apr-29-2018, 07:13 AM
Uh, yes.
Here it is.
Like 14. I can't jump twice to 15, so 4 is also counted as a character, but that not the goal.
Just considered whether a while loop could help me, because I can set the steps each round manually.
What do you think? Or is there any other more effective solution?
Yours Sincerely,
TimeMen
Here it is.
for i in range(0, len(pi)): x = int(pi[i]) if 0 < x < 3: y = int(pi[i+1]) if x == 1: char = int(pi[i] + pi[i+1]) + 65 chars.append(chr(char)) if x == 2 and y < 6: char = int(pi[i] + pi[i+1]) + 65 chars.append(chr(char)) print(chars)The problem is, that it iterates through the number, in this case Pi, but i can't jump twice if there is a number with two decimals which is contained in the alphabet.
Like 14. I can't jump twice to 15, so 4 is also counted as a character, but that not the goal.
Just considered whether a while loop could help me, because I can set the steps each round manually.
What do you think? Or is there any other more effective solution?
Yours Sincerely,
TimeMen