python实现学生信息管理系统,python实现数据可视化

  python实现学生信息管理系统,python实现数据可视化

  近一周,学习计划有点上瘾,我对计划的兴趣源自其简单的语法,只有成对的()。学习方案,加上自己的计算机编程语言编程,能很快的抄出一个计划解释器:

  https://github.com/zhangyun00.

  仔细看程序注释里的论文链接,介绍了绍大蟒实现的计划子集。我拿来改了改,加了为和正在…循环,打破跳出循环,可以使用元组、列表,字典,类定义类。

  运行python ZhScheme.py

  ZhScheme(图12)

  [元组,1,2]

  (1,2)

  ZhScheme(列表566)

  [列表,5,6,6]

  [5,6,6]

  ZhScheme(dict(list(list 56)(list 5634)))

  [dict ,[list ,[list ,5,6],[list ,56,34]]]

  {5:6,56:34}

  ZhScheme(sin12)

  [sin ,12]-0.5180004349 zhscheme(sin 34)

  罪,34]0 . 53360 . 33333333336

  [列表,3,4,5]

  (345)

  ZhScheme(列表(列表345)(列表45645))

  [列表,[列表,3,4,5],[列表,456,45]]

  ((345)(45645ZhScheme(definei4)

  [定义,我,4]

  zhschemei 4 zhscheme(while(i23)(begin(printi)(SETI(i1))(if(eq?i12)中断))

  )

  [while ,[ , I ,23],[begin ,[print , i],[set , I ,[ , I ,1]],

  [如果,[情商?, I ,12], break ]]]4567891011 zhscheme(for(SETI 23)(i45)(SETI(I2))(begin(printi)(if(eq?i3)break)))

  [for ,[set , I ,23],[ , I ,45],[set , I ,[

  #39;+','i',2]],['begin'

  ['print','i'],['if',['eq?','i',43],'break']]]2325272931333537394143ZhScheme>(env)

  ['env']

  variables...

  +:<built-infunctionadd>-:<built-infunctionsub>*:<built-infunctionmul>/:<built-infunctiontruediv>>:<built-infunctiongt><:<built-infunctionlt>>=:<built-infunctionge><=:<built-infunctionle>=:<built-infunctioneq>not:<built-infunctionnot_>eq?:<built-infunctionis_>equal?:<built-infunctioneq>max:<built-infunctionmax>min:<built-infunctionmin>abs:<built-infunctionabs>round:<built-infunctionround>car:<function<lambda>at0x0000cdr:<function<lambda>at0x0000list:<function<lambda>at0x000list-ref:<function<lambda>at0append:<built-infunctionadd>len:<built-infunctionlen>map:<class'map'>

  print:<built-infunctionprint>exit:Useexit()orCtrl-ZplusR

  open:<function<lambda>at0x000call/cc:<functioncallccat0x00procedure?:<built-infunctioncanull?:<function<lambda>at0x00number?:<function<lambda>at0xstring?:<function<lambda>at0xlist?:<function<lambda>at0x00struct?:<function<lambda>at0xdict?:<function<lambda>at0x00int:{}

  __name__:math

  __doc__:Thismoduleisalwaysav

  mathematicalfunctionsdefinedbyth

  __package__:

  __loader__:<class'_frozen_impor

  __spec__:ModuleSpec(name='math',

  orter'>,origin='built-in')acos:<built-infunctionacos>acosh:<built-infunctionacosh>asin:<built-infunctionasin>asinh:<built-infunctionasinh>atan:<built-infunctionatan>atan2:<built-infunctionatan2>atanh:<built-infunctionatanh>ceil:<built-infunctionceil>copysign:<built-infunctioncopycos:<built-infunctioncos>cosh:<built-infunctioncosh>degrees:<built-infunctiondegreerf:<built-infunctionerf>erfc:<built-infunctionerfc>exp:<built-infunctionexp>expm1:<built-infunctionexpm1>fabs:<built-infunctionfabs>factorial:<built-infunctionfacfloor:<built-infunctionfloor>fmod:<built-infunctionfmod>frexp:<built-infunctionfrexp>fsum:<built-infunctionfsum>gamma:<built-infunctiongamma>gcd:<built-infunctiongcd>hypot:<built-infunctionhypot>isclose:<built-infunctioniscloisfinite:<built-infunctionisfiisinf:<built-infunctionisinf>isnan:<built-infunctionisnan>ldexp:<built-infunctionldexp>lgamma:<built-infunctionlgammalog:<built-infunctionlog>log1p:<built-infunctionlog1p>log10:<built-infunctionlog10>log2:<built-infunctionlog2>modf:<built-infunctionmodf>pow:<built-infunctionpow>radians:<built-infunctionradiasin:<built-infunctionsin>sinh:<built-infunctionsinh>sqrt:<built-infunctionsqrt>tan:<built-infunctiontan>tanh:<built-infunctiontanh>trunc:<built-infunctiontrunc>pi:3.141592653589793e:2.718281828459045tau:6.283185307179586inf:infnan:nani:43struct...总之,这个scheme的目标是可以调用Python里的各种常用函数,以上env结果中的变量和函数都是你可以使用的。

  现在可解释执行,以行为单位的文件了:

  python ZhScheme.py test.s

  test.s文件内容:

  

(quotemustwritecodeaslines)

  (+25)

  (definei1)i(if(<i19)(print(+i1)))

  (while(<i23)(begin(printi)(seti(+i1))(if(eq?i12)break)))

  (for(seti23)(<i45)(seti(+i2))(begin(printi)(if(eq?i43)break)))

  (definef(opentest.ssr))

  ((.fread))

  (definedefine12)

  define

  (classpoint(list(listn2)(listm(lambdax(*2x)))))

  (definex(point))

  (.xn)

  ((.xm)4)

有在ZhScheme加入静态数据类型的想法,也就是说,除了能define x 12之外,还可以使用 int y 34,定义一个整形变量,如果set y 2.3会导致一个类型错误 -- 把浮点值付给了整型值,多数静态类型语言都是这么做的。

郑重声明:本文由网友发布,不代表盛行IT的观点,版权归原作者所有,仅为传播更多信息之目的,如有侵权请联系,我们将第一时间修改或删除,多谢。

留言与评论(共有 条评论)
   
验证码: