题目来源:https://leetcode.com/problems/container-with-most-water/题意分析: 给出一个n长度的非0数组,a1,a2,……,an,ai代表在坐标i上的高度为ai。以以ai,aj为高,i到j为底,可以构造出一个容器。那么求出这些容器中可以装的水.....
分类:
编程语言 时间:
2015-09-17 22:57:25
阅读次数:
222
函数是对程序逻辑进行结构化或过程化的一种编程方法。Python的函数返回值当什么也不返回时,返回了None和大多数语言一样,Python返回一个值或对象。只是在返回容器对象时,看起来像返回多个对象。这样在操作的时候显得很灵活,虽然它本质上只是反悔了一个对象。调用函数我们用一对圆括号电泳函数。任何输入...
分类:
编程语言 时间:
2015-09-17 22:55:53
阅读次数:
289
指定题目版本:问题描述On Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from ours. The game ...
分类:
其他好文 时间:
2015-09-17 22:55:39
阅读次数:
315
用 python 实现如下: 1 #!/usr/bin/python 2 # Complementing DNA 3 4 my_dna = "ACTGATCGATTACGTATAGTATTTGCTATCATACATATATATCGATGCGTTCAT" 5 # 由于python 区分大小写,所以先....
分类:
其他好文 时间:
2015-09-17 21:38:13
阅读次数:
406
利用 dictionary 可以将给定的cDNA序列翻译成蛋白序列 1 #!/bin/python 2 # Dictionary protein translation 3 4 my_dna = open("/home/maque/my_dna.txt").read().replace('\n',....
分类:
其他好文 时间:
2015-09-17 21:29:04
阅读次数:
164
看the c++ programming language时在“表达式和语句”这一章中有这样一个练习void send(int *to, int *from, int count){//Duff设施,有帮助的注释被有意删去了 int n = (count + 7) / 8; switc...
分类:
其他好文 时间:
2015-09-17 21:17:48
阅读次数:
154
习题来源: Python for Biologists: A complete programming course for beginner 1 #!/bin/python 2 # calculate the AT content of a DNA seq 3 4 def get_at_cont....
分类:
其他好文 时间:
2015-09-17 21:17:48
阅读次数:
147
1. update setup.pyfrom distutils.core import setupsetup( name = 'iamericnester', version = '1.4.0', py_modules = ['ne...
分类:
编程语言 时间:
2015-09-17 21:06:14
阅读次数:
193
python处理xml python xml 读取xml 获取dom对象 获取文档对象 节点属性 子节点的访问 文本节点 获取节点属性 小结:使用minidom来读取XML中的信息 编辑xml 生成dom对象 显示生成的xml内容 获取根元素 元素后添加子...
分类:
编程语言 时间:
2015-09-17 19:58:43
阅读次数:
170
1. register account by brower on https://pypi.python.org/pypi/2. register your moudle "nester" to PyPI via CMDC:\Users\eric\Documents\Python\nester>c:...
分类:
编程语言 时间:
2015-09-17 19:48:30
阅读次数:
238