Skip to content

@starenka /letrot.py
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
python code in ROT13 (Caesar)
#!/usr/bin/env python
# -*- coding: rot13 -*-
cevag '''Tnyyvn rfg bzavf qvivfn va cnegrf gerf, dhnehz hanz vapbyhag Orytnr, nyvnz Ndhvgnav,
gregvnz dhv vcfbehz yvathn Prygnr, abfgen Tnyyv nccryynaghe. Uv bzarf yvathn, vafgvghgvf,
yrtvohf vagre fr qvssrehag. Tnyybf no Ndhvgnavf Tnehzan syhzra, n Orytvf Zngeban rg
Frdhnan qvivqvg. Ubehz bzavhz sbegvffvzv fhag Orytnr, cebcgrern dhbq n phygh ngdhr
uhznavgngr cebivapvnr ybatvffvzr nofhag, zvavzrdhr nq rbf zrepngberf fnrcr pbzzrnag
ngdhr rn dhnr nq rssrzvanaqbf navzbf cregvarag vzcbegnag, cebkvzvdhr fhag Treznavf,
dhv genaf Eurahz vapbyhag, dhvohfphz pbagvaragre oryyhz trehag.'''.rapbqr("rot13")
@fprochazka
$ python ./test.py 
  File "./test.py", line 7
    dhv genaf Eurahz vapbyhag, dhvohfphz pbagvaragre oryyhz trehag.'''.rapbqr("rot13")
                                                                     ^
SyntaxError: invalid syntax

co dělám špatně?

@starenka
Owner
starenka@kosmik1:/tmp$ git clone git://gist.github.com/1745534.git
Cloning into '1745534'...
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 6 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (6/6), done.
starenka@kosmik1:/tmp$ cd 1745534/
starenka@kosmik1:/tmp/1745534$ ls
letrot.py
starenka@kosmik1:/tmp/1745534$ python letrot.py 
Gallia est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani,
tertiam qui ipsorum lingua Celtae, nostra Galli appellantur. Hi omnes lingua, institutis,
legibus inter se differunt. Gallos ab Aquitanis Garumna flumen, a Belgis Matrona et
Sequana dividit. Horum omnium fortissimi sunt Belgae, propterea quod a cultu atque
humanitate provinciae longissime absunt, minimeque ad eos mercatores saepe commeant
atque ea quae ad effeminandos animos pertinent important, proximique sunt Germanis,
qui trans Rhenum incolunt, quibuscum continenter bellum gerunt.
starenka@kosmik1:/tmp/1745534$ ls -l `which python`
lrwxrwxrwx 1 root root 9 Jan 24 22:52 /usr/bin/python -> python2.7

Chm, ja nevim? Nemas nahodou python 3? (tam uz to nejede)

@fprochazka

Ha funguje, :) Bez toho kódování to dělá kotrmelce :)

@starenka
Owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.