Challenges
Predicting Python output
Misc
Easy
Programming logic
Solves: 12
Predicting Python output
Author: CyberSamSU
Points
15
Execute the following Python code step-by-step on paper (without running the program) and find out what it prints:
harflar = list("cybersamsu2026")
natija = []
for i, ch in enumerate(harflar):
if i % 3 == 0:
natija.append(ch.upper())
elif i % 3 == 1:
natija.append(str((ord(ch) * 2) % 10))
else:
natija.append(ch)
natija.append(str(len(harflar)))
print(''.join(natija))
Submit the answer in the form BAYROQ{M1X_PY_<natija>} — the printed string result itself.
Theory: learn the topic
To submit a flag, log in.