Recent Changes - Search:

Oktatás

* Programozás 2
  + feladatsor
  + C feladatsor
  + Python feladatsor
  + GitHub oldal

* Szkriptnyelvek
  + feladatsor
  + quick link

* levelezősök
  + Adator. prog.
  + feladatsor
  + quick link

teaching assets


Félévek

* 2024/25/1
* archívum


Linkek

* kalendárium
   - munkaszüneti napok '20
* tételsorok
* jegyzetek
* szakdolgozat / PhD
* ösztöndíjak
* certificates
* C lang.
* C++
* C#
* Clojure
* D lang.
* Java
* Nim
* Scala


[ edit | logout ]
[ sandbox | passwd ]

20130218a

A beautiful mind

We received the following message in an email. Make it readable:

PY7H0N 15 4 W1D3LY U53D G3N3R4L-PURP053, H1GH-L3V3L PR0GR4MM1NG
L4NGU4G3. 175 D351GN PH1L050PHY 3MPH451Z35 C0D3 R34D4B1L17Y,
4ND 175 5YN74X 4LL0W5 PR0GR4MM3R5 70 3XPR355 C0NC3P75 1N F3W3R L1N35 0F
C0D3 7H4N W0ULD B3 P0551BL3 1N L4NGU4G35 5UCH 45 C++ 0R J4V4.
7H3 L4NGU4G3 PR0V1D35 C0N57RUC75 1N73ND3D 70 3N4BL3 CL34R PR0GR4M5 0N
B07H 4 5M4LL 4ND L4RG3 5C4L3.

Tip: treat this text as a multi-line string. You can store the text in a global variable, like this:

#!/usr/bin/env python3

TEXT = """
the text above
comes here
"""


def main():
    print('process TEXT...')

##############################################################################

if __name__ == "__main__":
    main()

Advanced solution

Use a dictionary for storing the "what/to what" pairs. Attention! If we haven't learnt about dictionaries yet, then skip this part.

Cloud City

  

Blogjaim, hobbi projektjeim

* The Ubuntu Incident
* Python Adventures
* @GitHub
* heroku
* extra
* haladó Python
* YouTube listák


Debrecen | la France


[ edit ]

Edit - History - Print *** Report - Recent Changes - Search
Page last modified on 2023 September 21, 06:09