摘要:
""" 1、生成100项斐波那契数列 2、求第n项斐波那契数列的值是多少 3、给定终止值,生成此前斐波那契数列 """ # 求第n项斐波那契数列的值是多少 def Fibonacci(n): if n == 1: # 如果n=1,返回0 return 0 elif n == 2: # 如果n=2,返 阅读全文
摘要:
class Animal(object): # 定义父类animal def __init__(self,name,sound): # 初始化属性 name sound self.name = name self.sound = sound self.talk() # 一实例化即调用talk()方法 阅读全文
摘要:
import random def verification_code(): num = [str(x) for x in range(10)] # 列表生成器0-9 upper = [chr(x) for x in range(65,91)] # A-Z lower = [chr(x) for x 阅读全文
摘要:
goods_dic = { "iphone":6000, "ipad":3000, "T-shirt":100, "coffee":30, "car":500000, "macbook":10000, "mix4":9999, "pen":2 } goods_list = [] salary = i 阅读全文
摘要:
下载链接:https://files.cnblogs.com/files/waterr/HTML_CSS_JS%E9%80%9F%E6%9F%A5.zip 阅读全文