python小技巧:[GUI项目]:Tkinter 创建秒表

在python中使用Tkinter创建秒表,Tkinter是Python的标准GUI库。

Python与Tkinter相结合,提供了一种创建GUI应用程序的快速、简便的方法。

Tkinter为TKGUI工具包提供了一个强大的面向对象的界面。很容易开始使用Tkinter。

# Python program to create a
# a new window using Tkinter
# importing the required libraires
import tkinter
  
# creating a object 'top' as instance of class Tk
top = tkinter.Tk()
  
# This will start the blank window
top.mainloop()

产出:

使用Tkinter创建秒表程序:

秒表是一种手持式计时器,用来测量从被激活的某一特定时间到该手表被停用的时间所经过的时间。一种用于远处观看的大型数字秒表,如在运动场中,称为停车钟。

在手动计时中,时钟由一个按下按钮的人启动并停止。在全自动时间内,启动和停止都是由传感器自动触发的。

所需模块:Tkinter

源代码:

# Python program to illustrate a stop watch 
# using Tkinter 
#importing 
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值