importrandom#根据输入参数显示对应结果whileTrue:#获取输入参数play=int(input("请输入您得动作(0剪刀1石头2布或退出程序3):"))#电脑随机动作动作computer=random.randint(0,2)if(play==0andcomputer==2)or(play==1andcomputer==0)or(play==2andcomputer==1):pr
分类:
编程语言 时间:
2019-01-25 18:42:42
阅读次数:
279
对Discrete Mathematics Using a Computer的第一章Introduction to Haskell进行总结。环境Windows,关于函数的部分太长了,分开写。 常用的对列表list操作的函数common functions on lists length :: [a] ...
分类:
其他好文 时间:
2019-01-25 14:09:55
阅读次数:
163
对Discrete Mathematics Using a Computer的第一章Introduction to Haskell进行总结。环境Windows 函数毫无疑问是函数式语言的核心。 在Haskell中(无特殊指明,以下皆是指在Haskell下),一个表达式用函数完成计算被称为a func ...
分类:
其他好文 时间:
2019-01-24 13:23:41
阅读次数:
124
Computer HDU - 2196 A school bought the first computer some time ago(so this computer's id is 1). During the recent years the school bought N-1 new co ...
分类:
其他好文 时间:
2019-01-23 19:06:52
阅读次数:
104
主要介绍Haskell中的基本操作和类型和类型中的注意点。操作环境Windows 对Discrete Mathematics Using a Computer的第一章Introduction to Haskell进行总结。 1. 在安装了ghci后,便可以进行Haskell的编译,点击GHCi 即可 ...
分类:
其他好文 时间:
2019-01-23 10:33:41
阅读次数:
553
ORM WIKI中的解释。画重点 Object-relational mapping (ORM, O/RM, and O/R mapping tool) in computer science is a programming technique for converting data betwee ...
分类:
其他好文 时间:
2019-01-21 17:52:08
阅读次数:
148
1.实验内容与完成情况:(实验具体步骤和实验截图说明) (一) MySQL 数据库操作 学生表 Student Name English Math Computer zhangsan 69 86 77 lisi 55 100 88 根据上面给出的 Student 表,在 MySQL 数据库中完成如下... ...
分类:
数据库 时间:
2019-01-20 14:01:53
阅读次数:
204
Problem Description Bob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast enough and then he i ...
分类:
其他好文 时间:
2019-01-20 11:50:29
阅读次数:
168
Petya loves computer games. Finally a game that he's been waiting for so long came out! The main character of this game has n different skills, each o ...
分类:
其他好文 时间:
2019-01-20 00:54:18
阅读次数:
145
1. 产生一个随机数组和空字典 2. 对字典排序 3. 写两个对字典排序的方法 4. 上边是常规方法,介绍一下collections Counter 5. 练习:统计一段英文里出现频率最高的单词 6. 另一种字典排序 zip 把字典转化成tuplelist再排序 注意一下d1.keys()这里, 如 ...
分类:
其他好文 时间:
2019-01-19 21:22:00
阅读次数:
223