鱼C论坛

 找回密码
 立即注册
查看: 723|回复: 1

视频照着打,为什么还出错,

[复制链接]
发表于 2018-12-8 16:52:09 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
import time as t

class MyTimer():
    def start(self):
        self.start = t.localtime()
        print('计时开始')

    def stop(self):
        self.stop = t.localtime()
        self._calc()
        print('计时结束')


    def _calc(self):
        self.laseted = []
        self.prompt = '总共运行了'
        for index in range(6):
            self.lasted.append(self.stop[index] - self.start[index])
            self.prompt += str(self.lasted[index])

        print(self.prompt)
微信图片_20181208165101.png

边看视频边照着打的,,到底哪里出错了?


小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2018-12-8 16:53:58 | 显示全部楼层
知道了。。原来是自己打多了e~~~~
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2026-1-12 01:18

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表