Differences

This shows you the differences between two versions of the page.

programiranje:python_challenge:nivo_1 [2009/11/23 09:05] (current)
delboy created
Line 1: Line 1:
 +===== Python Challenge - Nivo 1 =====
 +U [[http://www.pythonchallenge.com/pc/def/map.html|ovom nivou]] na slici je prikazano pravilo po kome treba menjati teks ispod slike da bi se dobilo rešenje. U pitanju je pomeranje slova za 2 u ASCII tabeli. Kad se pravilo primeni na dati text, kao rezultat se dobije uputstvo da se isto pravilo primeni na URL.
 +<code python>
 +#!/usr/bin/env python
 +import string
 +trans = string.maketrans(string.lowercase, string.lowercase[2:] + string.lowercase[:2])
 +text = """g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb.
 +    lmu ynnjw ml rfc spj."""
 +print string.translate(text, trans)
 +
 +url = "map"
 +print
 +print string.translate(url, trans) + ".html"
 +</code>
 +
 +**Rešenje**: http://www.pythonchallenge.com/pc/def/ocr.html
 
programiranje/python_challenge/nivo_1.txt · Last modified: 2009/11/23 09:05 by delboy
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki