Python 简单斐波那契数列
2016-05-07 12:51
267 查看
n = int(raw_input())
first = 0
second = 1
f = [0]
num = 0
while num < 51:
first, second = second, first + second
f.append(first)
num += 1
print f
first = 0
second = 1
f = [0]
num = 0
while num < 51:
first, second = second, first + second
f.append(first)
num += 1
print f
相关文章推荐
- Python-opencv之目标定位
- Python数据分析示例(2)Day3
- pwntools使用简介
- python基础(三元运算+深浅拷贝+函数参数)
- python 多线程 thread 加锁(二)
- Detecting Insults in Social Commentary 数据分析报告(python)
- 零基础学python》(第二版)
- Python实现Mysql数据库连接池
- Python实现Mysql数据库连接池
- Titanic数据分析报告(python)
- Python学习笔记:列表(list)有关函数
- Python的dict字典结构操作方法学习笔记
- python 多线程 thread 不推荐使用(一)
- python统计字符串里每个字符的次数
- python乱码浅析-乱码解码及数据库编码配置
- 个股与指数的回归分析(python)
- GeoPython 随笔:空间数据查询——测试代码
- python自定义模块导入方法
- 110. Balanced Binary Tree [easy] (Python)
- python执行mysql source命令