![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python 入门
StevenChow777
记录入坑编程的点点滴滴
展开
-
用Python寻找水仙花数
100天学Python之第五天水仙花数(Narcissistic number)也被称为超完全数字不变数(pluperfect digital invariant, PPDI)、自恋数、自幂数、阿姆斯壮数或阿姆斯特朗数(Armstrong number),水仙花数是指一个 3 位数,它的每个位上的数字的 3次幂之和等于它本身(例如:1^3 + 5^3+ 3^3 = 153)。import ma...原创 2019-05-17 18:02:32 · 3830 阅读 · 0 评论 -
用Python实现斐波那契数列
#!/usr/bin/env python3# -*- coding: utf-8 -*-"""Created on Fri May 17 19:39:06 2019@author: tungleung"""a = 1b = 1print(1, end = ' ')print(1, end = ' ')for x in range(2, 100000): if x =...原创 2019-05-17 20:01:14 · 206 阅读 · 0 评论