Files
mixly3/boards/default/python_skulpt/examples/2-2-3凯撒加密(ASCII码补充解密验证).mix
2024-07-23 21:49:42 +08:00

1 line
14 KiB
XML

<xml version="Mixly 2.0 rc4" board="Python 3 Lite@Python 3 Lite"><block type="variables_set" id="oJ;/fflB2#ur)N6H!m;D" x="-393" y="-265"><field name="VAR">s</field><value name="VALUE"><block type="inout_type_input" id="27svDE$gdN{a8-qZ-@s2"><field name="DIR">str</field><value name="VAR"><shadow type="text" id="bNmxZSgKKjI7BxcYxN7*"><field name="TEXT">请输入明文:</field></shadow></value></block></value><next><block type="variables_set" id="3?wk#zyvd=~@h,4mRPT7"><field name="VAR">n</field><value name="VALUE"><block type="inout_type_input" id="p=!C4LVz|GB;Tm|d*Gm`"><field name="DIR">int</field><value name="VAR"><shadow type="text" id="uzWcR-Foxl6dLw|^{ei#"><field name="TEXT">请输入位移值:</field></shadow></value></block></value><next><block type="lists_create_with" id="2jG{b_ft=c1-TE{sQ85B" inline="true"><mutation items="0"></mutation><field name="VAR">jiami</field><next><block type="controls_forEach" id="Mgq.G^?}@4DzS(e)x?95"><comment pinned="true" h="80" w="160">加密</comment><value name="LIST"><shadow type="list_many_input" id="G(5`5XBFdm$S9y:(sQPr"><field name="CONTENT">0,1,2,3</field></shadow><block type="variables_get" id="`_4eI.w~G)YO.{wB84mL"><field name="VAR">s</field></block></value><value name="VAR"><shadow type="variables_get" id="@[z~pk1`1Xq,yky5u{6Z"><field name="VAR">i</field></shadow></value><statement name="DO"><block type="controls_if" id="iXdW-eL1Bjc[o`.Xl8o+"><mutation else="1"></mutation><value name="IF0"><block type="logic_compare" id="`tHtPqNXMo-4!$C10sS#" inline="false"><field name="OP">GT</field><value name="A"><block type="math_arithmetic" id="@lxIy*OqGBnJTmgr=I`o"><field name="OP">ADD</field><value name="A"><shadow type="math_number" id="~;|1TxddX#8]L;4e7tgx"><field name="NUM">1</field></shadow><block type="char_to_ascii" id="fp(H3/Upv3-iL0WhI{BB"><value name="VAR"><shadow type="text" id="gsOH4@q^0jzubdidy:$m"><field name="TEXT">a</field></shadow><block type="text_capital" id="C^EDF;bXKhkG3b(#:`FS"><field name="CAPITAL">lower</field><value name="VAR"><shadow type="text" id="?scdZvH)Bf::t1)eI9bI"><field name="TEXT">Hello,mixly</field></shadow><block type="variables_get" id="PYc8SfoH]8p23(y2*tCy"><field name="VAR">i</field></block></value></block></value></block></value><value name="B"><shadow type="math_number" id="uWRs9vxk]hNZk*!y~-2C"><field name="NUM">1</field></shadow><block type="variables_get" id="?fjnF{oxGP)]=cIznKdc"><field name="VAR">n</field></block></value></block></value><value name="B"><block type="char_to_ascii" id="I,$yHfskvfl0pPLJ1@Au"><value name="VAR"><shadow type="text" id="40;^Ntp]ij/HDmUrjtsn"><field name="TEXT">z</field></shadow></value></block></value></block></value><statement name="DO0"><block type="lists_append_extend" id="PQ|q2T.+w)(^`N}6Nl#]"><field name="OP">append</field><value name="LIST"><shadow type="variables_get" id="~oCw~_;0grZYW}5qh;L{"><field name="VAR">mylist</field></shadow><block type="variables_get" id="~C4F)zIwe^PcYf,$LjK/"><field name="VAR">jiami</field></block></value><value name="DATA"><shadow type="math_number" id="n9E[Dp=KiT.:JJ(}jz40"><field name="NUM">0</field></shadow><block type="ascii_to_char" id=",vwr(2cb-u+afzg`DO9*"><value name="VAR"><shadow type="math_number" id="E7eSImn8593BY8a]c}[W"><field name="NUM">65</field></shadow><block type="math_arithmetic" id="P4+!PkX|Pp(y`VCqz}Y1" inline="false"><field name="OP">MINUS</field><value name="A"><shadow type="math_number" id="?v^c8J,lpH0T,Mg7P7_:"><field name="NUM">1</field></shadow><block type="math_arithmetic" id="cPcCfrPB~6LdM9mMF,:E"><field name="OP">ADD</field><value name="A"><shadow type="math_number" id="yP9zJX~!U8Pe9}mXGJzV"><field name="NUM">1</field></shadow><block type="char_to_ascii" id="Fid5?i[kG9FNaFsk*X03"><value name="VAR"><shadow type="text" id="j+D6BuA${1TYaSK:.gz!"><field name="TEXT">a</field></shadow><block type="text_capital" id="/YSDG3|g6ZiXA@|^?M`]"><field name="CAPITAL">lower</field><value name="VAR"><shadow type="text" id="$8[1HHM]DLg`cQ)UHSF5"><field name="TEXT">Hello,mixly</field></shadow><block type="variables_get" id="!_qD9d~i7Kk]r9IQKtZk"><field name="VAR">i</field></block></value></block></value></block></value><value name="B"><shadow type="math_number" id="s)@ne4n4kY/y;[gA$)CU"><field name="NUM">1</field></shadow><block type="variables_get" id="!:)XvUj=TN@}t|@e|n6x"><field name="VAR">n</field></block></value></block></value><value name="B"><shadow type="math_number" id="=3:Bv!ru@crF96`hX7h^"><field name="NUM">26</field></shadow></value></block></value></block></value></block></statement><statement name="ELSE"><block type="lists_append_extend" id="2zL9He8L9`oGn43W{f1G"><field name="OP">append</field><value name="LIST"><shadow type="variables_get" id="Lo|DZL4lrQr^#1~dkwB8"><field name="VAR">mylist</field></shadow><block type="variables_get" id="f[*PS?+8haWhz0FY)I0Q"><field name="VAR">jiami</field></block></value><value name="DATA"><shadow type="math_number" id="Pl]dXVh/$|1dz10?tKN*"><field name="NUM">0</field></shadow><block type="ascii_to_char" id="(Qk.d!,s*SH*vr-Ey.W:"><value name="VAR"><shadow type="math_number" id="@Iw,#(zrme)tO`#cpFf|"><field name="NUM">65</field></shadow><block type="math_arithmetic" id="@lN0LstOq$EHvQFSRUeW"><field name="OP">ADD</field><value name="A"><shadow type="math_number" id="GpqtLJk?kI/~E?I@{+N:"><field name="NUM">1</field></shadow><block type="char_to_ascii" id=".@@Xo#U]!nK^5hc5ddcp"><value name="VAR"><shadow type="text" id="NU_p5`_4v?j6PK}~=3kA"><field name="TEXT">a</field></shadow><block type="text_capital" id="4]*C18=#a-ntH:ibZjIE"><field name="CAPITAL">lower</field><value name="VAR"><shadow type="text" id="tN-$Va}Zt.fuz-[#{k:2"><field name="TEXT">Hello,mixly</field></shadow><block type="variables_get" id="X$m:iT[V*2z6=Muc}rWu"><field name="VAR">i</field></block></value></block></value></block></value><value name="B"><shadow type="math_number" id="Q5?VqsSwdCZK)F./jO0g"><field name="NUM">1</field></shadow><block type="variables_get" id="JoWnVNc8RMXOZR-EKuAA"><field name="VAR">n</field></block></value></block></value></block></value></block></statement></block></statement><next><block type="inout_print" id="wx51WnJo*W=_@5Q0lqPN"><value name="VAR"><shadow type="text" id="D2^=T}oX0Z,#u0=4x1!@"><field name="TEXT">Hello</field></shadow><block type="text_join" id="}``4Vpsb|V.4nR6T97dr"><value name="A"><shadow type="text" id="+e#qB$X~0H_7|m*Uv9pg"><field name="TEXT">加密结果:</field></shadow></value><value name="B"><shadow type="text" id="?8AhKR|VLlu?C18-?2We"><field name="TEXT">Mixly</field></shadow><block type="text_join_seq" id="4xU-;q,H2e[9x?Ca}|~+"><value name="VAR"><shadow type="text" id="bGIo,uD4##2a-^=TWnKk"><field name="TEXT"></field></shadow></value><value name="LIST"><shadow type="variables_get" id="S0AEIvhvu*AW*fNXd(5["><field name="VAR">mylist</field></shadow><block type="variables_get" id="tPEoV6CKu38S,s$GjE$t"><field name="VAR">jiami</field></block></value></block></value></block></value><next><block type="lists_create_with" id="+Ps,K|jXWZF+Go$@42lX" inline="true"><mutation items="0"></mutation><field name="VAR">decipher</field><next><block type="controls_forEach" id="[lL*1Bl,t/{wtRlL$qn#"><comment pinned="false" h="80" w="160">解密</comment><value name="LIST"><shadow type="list_many_input" id="p{@+GoDAQ/z?GrLpeWBh"><field name="CONTENT">0,1,2,3</field></shadow><block type="variables_get" id="S^-Z)c!qJ1OIF+hu?U$:"><field name="VAR">jiami</field></block></value><value name="VAR"><shadow type="variables_get" id="68nnV!$0InSY=?{#npE+"><field name="VAR">j</field></shadow></value><statement name="DO"><block type="controls_if" id="Dx`.-db*Z^{BO;:8+}tl"><mutation else="1"></mutation><value name="IF0"><block type="logic_compare" id="~E./W,|@#6A5ZcObyANj" inline="false"><field name="OP">LT</field><value name="A"><block type="math_arithmetic" id=";^e-.qmo)41IyTOQRJ$,"><field name="OP">MINUS</field><value name="A"><shadow type="math_number" id="yDMb(Pd,lS]o8DD@lGW3"><field name="NUM">1</field></shadow><block type="char_to_ascii" id="kC/6sc:34BYP-4L|)S!n"><value name="VAR"><shadow type="text" id="YiSH.(ipytJ#@/2fqT.9"><field name="TEXT">a</field></shadow><block type="text_capital" id="LsndiG!iXikg#HBQPg.L"><field name="CAPITAL">lower</field><value name="VAR"><shadow type="text" id="UUb/L22{d}n$mw/Ige~O"><field name="TEXT">Hello,mixly</field></shadow><block type="variables_get" id="8,g#jgmh-W^.YC*#+Ywk"><field name="VAR">j</field></block></value></block></value></block></value><value name="B"><shadow type="math_number" id="tYK=[$tFihwnph($$${B"><field name="NUM">1</field></shadow><block type="variables_get" id="Hc,)M/ne!BacF`{:lf;M"><field name="VAR">n</field></block></value></block></value><value name="B"><block type="char_to_ascii" id="-FZ5tXX):{lZ@Rblel:#"><value name="VAR"><shadow type="text" id="e0Z?1Qm^]wlH{!up!Zcr"><field name="TEXT">a</field></shadow></value></block></value></block></value><statement name="DO0"><block type="lists_append_extend" id="0~qb`H|6S|s#QYvTu15#"><field name="OP">append</field><value name="LIST"><shadow type="variables_get" id="RNB:-2HuH76f!Wffo|,3"><field name="VAR">mylist</field></shadow><block type="variables_get" id="+HP:rj*-`=f6(rwa7Qhh"><field name="VAR">decipher</field></block></value><value name="DATA"><shadow type="math_number" id="myQsI1no7e#Y;m-{q+4G"><field name="NUM">0</field></shadow><block type="ascii_to_char" id="8`tokrOw1nk5tX2UHAtu"><value name="VAR"><shadow type="math_number" id="LB)e8OzO*rD#svn-^qH|"><field name="NUM">65</field></shadow><block type="math_arithmetic" id="NRHM?RqKjsWzRTFuzh]2" inline="false"><field name="OP">ADD</field><value name="A"><shadow type="math_number" id=")ZGHx|9=q+o1-:-;0st3"><field name="NUM">26</field></shadow><block type="math_arithmetic" id="n?f8K)YuG=9JwEf5wGxt"><field name="OP">MINUS</field><value name="A"><shadow type="math_number" id="0Gb?hfYT[f?QxD`}UW=W"><field name="NUM">1</field></shadow><block type="char_to_ascii" id="^,*[m~T30?eNXq;u:YL-"><value name="VAR"><shadow type="text" id="p;h9P~n[!nCIb1RWYzn0"><field name="TEXT">a</field></shadow><block type="text_capital" id="(f|[?xRiE]OqCsCF7`|A"><field name="CAPITAL">lower</field><value name="VAR"><shadow type="text" id="0{d}9yRIJ3)bd_Xr/Bht"><field name="TEXT">Hello,mixly</field></shadow><block type="variables_get" id="xedtWwgqFdrg0[EStQtK"><field name="VAR">j</field></block></value></block></value></block></value><value name="B"><shadow type="math_number" id="=X6P4O;!aAZ(6873)Ybm"><field name="NUM">1</field></shadow><block type="variables_get" id="#-sX|dvG3eZA_{=052W."><field name="VAR">n</field></block></value></block></value><value name="B"><shadow type="math_number" id="a}:W./O~);kskTFu=s48"><field name="NUM">26</field></shadow></value></block></value></block></value></block></statement><statement name="ELSE"><block type="lists_append_extend" id="mmQU83H62a_]$TFusmAt"><field name="OP">append</field><value name="LIST"><shadow type="variables_get" id="s-E;Cf;^#7M*ThYq]:Ce"><field name="VAR">mylist</field></shadow><block type="variables_get" id=")A*~Pv,kjO*L?HJTq?+o"><field name="VAR">decipher</field></block></value><value name="DATA"><shadow type="math_number" id="`Tb5Tm1QzareF0/gkz0!"><field name="NUM">0</field></shadow><block type="ascii_to_char" id="$5rBPY53p[}qf!O6ov2D"><value name="VAR"><shadow type="math_number" id="a$V`^NZO^?5_mf!({9k-"><field name="NUM">65</field></shadow><block type="math_arithmetic" id="z9rgl:wo~eK[8VdNNvuj"><field name="OP">MINUS</field><value name="A"><shadow type="math_number" id="b}JuK:Q#_6Wjl6yN[TM:"><field name="NUM">1</field></shadow><block type="char_to_ascii" id="2b^;bJDJ+H[Pw+HDU?XC"><value name="VAR"><shadow type="text" id="_`D=3,W726Omti}PWuDb"><field name="TEXT">a</field></shadow><block type="text_capital" id=".P8Z_.Tz1n/bRAG(;zAr"><field name="CAPITAL">lower</field><value name="VAR"><shadow type="text" id="{P/B4Ky^i.cYIhCAp)`("><field name="TEXT">Hello,mixly</field></shadow><block type="variables_get" id=":(K=q@{ZQrmO;k_3m.Ek"><field name="VAR">j</field></block></value></block></value></block></value><value name="B"><shadow type="math_number" id="Y12yAe5,5O+O3h9lMwSK"><field name="NUM">1</field></shadow><block type="variables_get" id="!R*QUbOqm;lZlmOLG-{O"><field name="VAR">n</field></block></value></block></value></block></value></block></statement></block></statement><next><block type="inout_print" id="?1~tfQ6-NxL`Y(HN{NS."><value name="VAR"><shadow type="text" id="Hz4[d;g)P.@oX7(k=/*r"><field name="TEXT">Hello</field></shadow><block type="text_join" id="wm/|YyD,N*gdV=y@3WeK"><value name="A"><shadow type="text" id="#8IH@o4::AlpXOC+B;U7"><field name="TEXT">解密结果:</field></shadow></value><value name="B"><shadow type="text" id="pyo!KSdP=]#0Who0TV~:"><field name="TEXT">Mixly</field></shadow><block type="text_join_seq" id="3S#=,bnC@H0q(Z9(oos|"><value name="VAR"><shadow type="text" id="vFW0BxolEB97@DXTzEM|"><field name="TEXT"></field></shadow></value><value name="LIST"><shadow type="variables_get" id="cPM}SP,}uJnSO#.cBk+@"><field name="VAR">mylist</field></shadow><block type="variables_get" id="{o`a/mXUlQx-LxeJePC4"><field name="VAR">decipher</field></block></value></block></value></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></xml><config>{}</config><code>cyA9IGlucHV0KCfor7fovpPlhaXmmI7mlofvvJonKQpuID0gaW50KGlucHV0KCfor7fovpPlhaXkvY3np7vlgLzvvJonKSkKamlhbWkgPSBbXQojIOWKoOWvhgpmb3IgaSBpbiBzOgogICAgaWYgb3JkKGkubG93ZXIoKSkgKyBuID4gb3JkKCd6Jyk6CiAgICAgICAgamlhbWkuYXBwZW5kKGNocigoKG9yZChpLmxvd2VyKCkpICsgbikgLSAyNikpKQogICAgZWxzZToKICAgICAgICBqaWFtaS5hcHBlbmQoY2hyKChvcmQoaS5sb3dlcigpKSArIG4pKSkKcHJpbnQoKCfliqDlr4bnu5PmnpzvvJonICsgJycuam9pbihqaWFtaSkpKQpkZWNpcGhlciA9IFtdCiMg6Kej5a+GCmZvciBqIGluIGppYW1pOgogICAgaWYgb3JkKGoubG93ZXIoKSkgLSBuIDwgb3JkKCdhJyk6CiAgICAgICAgZGVjaXBoZXIuYXBwZW5kKGNocigoKG9yZChqLmxvd2VyKCkpIC0gbikgKyAyNikpKQogICAgZWxzZToKICAgICAgICBkZWNpcGhlci5hcHBlbmQoY2hyKChvcmQoai5sb3dlcigpKSAtIG4pKSkKcHJpbnQoKCfop6Plr4bnu5PmnpzvvJonICsgJycuam9pbihkZWNpcGhlcikpKQo=</code>