An interactive alarm clock written in Python

Source: Internet
Author: User

#filename my little alarm clock.

Import time

Import Sys

Import WinSound

A=time.ctime ()

Print ("***************** Pro is Now", A, "**********************")

Print ("*********************** welcome you to use Shup DIY alarm Clock applet ***********************")

Hour1=int (Input ("*****************", enter the hour you want to set the alarm (for example, 10): "))

Minutes=int (Input ("**************** Pro, please enter the minutes to set the alarm (e.g. 20):"))

i = 3

O=3

While I:

A= list (Time.localtime ()) #获取本地时间

hour = a[3]

minute = A[4]

If hour = = Hour1 and minute== minutes: # Make a judgment of the hint input

I-=1

While o:

WinSound. PlaySound ("Systemexit", WinSound. Snd_alias)

WinSound. PlaySound ("*", WinSound. Snd_alias)

O-=1


Print ("************************ Thank you for using, wish you have a happy mood!" ********************")

Print ("*********************** Thank you for using Shup DIY alarm applet ***********************")


This article is from the "Make a few" blog, be sure to keep this source http://9399369.blog.51cto.com/9389369/1610199

An interactive alarm clock written in Python

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.